流言协议Gossip protocol
节点周期性地随机挑选同伴交换状态,使信息像流行病一样在集群中扩散;不需要中心协调者,对节点故障天然稳健。

菌丝网络 — 养分沿菌丝扩散:每个节点只与少数邻居交换,消息却能在对数轮次内覆盖整片森林。
流言协议(gossip protocol,又称流行病协议)让集群中的每个节点周期性地随机挑选少数同伴交换状态。没有中心协调者,信息却能像流行病一样扩散到整个集群;任何单个节点失效,都不会阻断传播。
A gossip protocol (also epidemic protocol) has every node in a cluster periodically pick a few random peers and exchange state with them. There is no coordinator, yet information spreads through the cluster like an epidemic, and no single failed node can stop it.
推、拉与推拉Push, pull and push–pull
- 推:知道新消息的节点把它发给随机同伴。
- 拉:节点向随机同伴询问是否有新消息。
- 推拉:双方交换摘要,各自补齐对方缺失的部分。
- Push — a node that knows an update sends it to a random peer.
- Pull — a node asks a random peer for anything new.
- Push–pull — both sides exchange digests and fill in what the other is missing.
收敛速度How fast it converges
每一轮里,已知消息的节点数量大致翻倍,因此覆盖 个节点所需的轮数只随 增长:

