PacificA: Replication in Log-Based Distributed Storage Systems 论文理解
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 發送配置變更信息給配置管理服務,那么將會出現雙主。
總結
以上是生活随笔為你收集整理的PacificA: Replication in Log-Based Distributed Storage Systems 论文理解的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: leetcode 763. Partit
- 下一篇: leetcode 767. Reorga