Raft 算法在分佈式存儲系統 Curve 中的實踐

{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"作爲網易數帆開源的高性能、高可用、高可靠的新一代分佈式存儲系統,Curve對於多副本數據同步、負載均衡、容災恢復方面都有較高的要求。網易數帆存儲團隊選用Raft算法作爲Curve底層一致性協議,並基於Raft的特性,實現了異常情況下的數據遷移和自動恢復。本文首先簡要介紹一下Raft算法的一些基本概念和術語,再詳細介紹其在Curve中的實踐。"}]},{"type":"heading","attrs":{"align":null,"level":1},"content":[{"type":"text","text":"Raft一致性算法介紹"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Raft算法中,有Leader、Follower、Candidate三種角色,它們之間的轉換關係如下圖:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.infoq.cn\/resource\/image\/d5\/0c\/d56940cea3eec0dccb2eac03488b3c0c.jpg","alt":null,"title":"","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":"","fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在同一時刻,只能有一個Leader,當選Leader後到發起下一次選舉稱爲一個任期(term),Leader負責通過心跳向follower保持統治,並同步數據給Follower。Follower發起選舉的前提是超時未收到Leader的心跳。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章