PacificA: Replication in Log-Based Distributed Storage Systems 论文理解

x33g5p2x  于2021-12-01 转载在 其他  
字(1.0k)|赞(0)|评价(0)|浏览(180)

PacificA: Replication in Log-Based Distributed Storage Systems 论文理解

思考:论文有个结论说,相比 GFS 具有中心化的实体,PacificA 没有单点问题(指单点不可靠+单点有请求数量瓶颈)。它的配置中心不是单点的吗?

回答:PacificA 只有在拓扑结构发生改变的时候,才会和配置中心进行交互,普通的请求是不会打到 configuration manager 的。

思考:普通的请求为什么不会打到 configuration manager?强一致性情况下,primary 是如何不需要去 configuration manager 那里确认,就能知道自己是最新的主的?

回答:因为它有 Primary Invariant 的保证,不会同时有两个主存在。Primary Invariant 的意思是,只有当 configuration manager 记录了自己是主的时候,才会认为自己是主。这样保证了最多同时只有一个主存在。

思考:Primary Invariant 是如何保证不会同时有两个主存在的?

回答:通过让 primary 总是优先于 secondary 去 timeout,即 as long as the grace period is the same as or longer than the lease period, the lease is guaranteed to expire on the primary before it does on secondary.

思考:When any lease from a secondary expires, the primary no longer considers itself a primary and stops processing queries or updates. 在 expire 之后,Primary 除了剔除 Secondary 以外,为什么自己也要退位?明明是别人挂了,为什么要伤害自己?

回答:因为是强一致,一旦一个 Secondary 不在,那么复制就没有办法继续了。所以 Primary 需要剔除 Secondary。但是这里需要注意的,一旦 Primary 发现 Secondary 不在了,也就是自己的租约的过期了。这里是因为 Primary 的租约是由所有 Secondaries 来保证,租约过期了,自然必须停止服务,否则就可能产生双主,例如 Primary 发送给配置管理服务的配置变更消息由于网路延迟的原因,落后于 Secondary 发送配置变更信息给配置管理服务,那么将会出现双主

相关文章

微信公众号

最新文章

更多