One node in a network of 8 learns something new. There's no server, no broadcast channel — just peers who occasionally talk to a few other peers. How does the whole network find out?
Click "gossip one round" a few times. Node 0 tells a couple of neighbors, then those nodes each tell a couple more — the highlighted ring shows exactly who just heard the news this round. Nobody ever had to contact all 8 nodes directly; the rumor spreads through the network itself.
In an anti-entropy / push gossip protocol, every node that knows a piece of information (is "infected") contacts a small, bounded number of peers — its fanout — each round. Any peer it contacts becomes infected too, and joins in spreading next round:
- — the set of nodes that have heard the rumor after round (round 0 is just the one starting node).
- — the up-to- peers node contacts during round , drawn from its fixed neighbor list.
- — the fanout: how many peers each infected node contacts per round.
- Growth compounds, it doesn't add
Because every currently-infected node gossips simultaneously each round — not just the original source — the infected set can multiply round over round instead of only growing by a fixed amount, the way epidemics spread through a population.
- Fanout trades speed for chatter
A larger fanout reaches full coverage faster, at the cost of more messages sent per round. A fanout of 1 is the cheapest per round but the slowest to converge; a fanout equal to a node's full degree (flooding) is fastest but sends the most messages.
Drag the fanout slider down to 1, gossip forward, and watch how much longer it takes to reach every node — and how it can even stall for a round with nothing new happening, simply because this round's rotation of peers hasn't reached the last holdout yet. Push fanout up to 3 and the same 8-node network gets fully infected in half the rounds.
Same fixed 8-node network (each node has exactly 3 neighbors — a ring plus one long "shortcut" to the node directly opposite it), starting from node 0:
- Fanout 2, round by round
Peer selection rotates through each node's neighbor list by
offset = round mod 3, contacting the next 2 neighbors from there:- Round 1 (offset 0): node 0's neighbors are , so it contacts the first two, and → infected
- Round 2 (offset 1): node 0 contacts (its neighbors shifted by 1), node 1 contacts , node 4 contacts → infected grows to — seven of eight
- Round 3 (offset 2): nodes 2, 5, and 7 each shift to contacting as one of their two targets — the last holdout finally gets reached → all 8 nodes infected
- Fanout 1 takes noticeably longer
With only one peer contacted per round (just
offset's neighbor, no second target):- Round 1: infected
- Round 2: infected
- Round 3: infected
- Round 4: stalls — every infected node's single round-4 target already belongs to the set
- Round 5: node 3 finally gets reached — all 8 nodes infected
Needing 5 rounds total to fully cover.
- Fanout 3 (flooding) is fastest
Contacting every neighbor every round reaches all 8 nodes in just 2 rounds — the fastest possible for this graph, at triple the per-round message cost of fanout 1.
Pick a fanout (1, 2, or 3) so the rumor reaches all 8 nodes within 3 rounds, then gossip forward and confirm it.
Gossip protocols get information everywhere without anyone needing a full membership list or a central broadcaster — every node just needs to know a few peers. The fanout is the one knob that trades speed (fewer rounds to full coverage) against chatter (more messages per round), and the same rule underlies both "rumor spreading" and, later in this part, keeping cluster membership itself up to date.