分布式系统 - 脑裂

Split brain in a distributed system is a problem that can occur in consistent systems. If a network partition occurs in a consistent system then one side or the other (or both) of the partition needs to stop responding to requests to maintain the consistency guarantee. If both sides continue to respond to reads and writes while they are unable to communicate with each other they will diverge and no longer be consistent. This state where both sides of the partition remain available is called split brain.

在分布式系统中脑裂是一个系统中可能出现的问题。 如果网络分区出现在一致的系统中,则分区的一侧或另一侧(或两者)需要停止响应维护一致性保证的请求。 如果双方在无法相互通信的情况下继续响应读写,则它们会发散并且不再一致。 分区两侧保持可用的状态称为脑裂。

比如对于Raft协议的实现,网络分区导致两个leader产生,这个就是出现了脑裂现象,如果两个leader同时处理客户端的写请求,就会导致数据一致性问题。Raft协议肯定是要考虑这种情况,使得就算是出现脑裂也不会影响系统的数据一致性。Raft协议中通过选举的限制和日志复制的一些控制来解决脑裂问题。

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容