System design · interactive
Gossip protocols
How does news (a node joined, a node died) reach all 32 servers without a central coordinator? Each round, every server that knows tells a few random peers. Like a rumour, it spreads exponentially.
Number: the round a node heard the news. Green: just heard.
round 0 · 1/32 know · everyone after 6 rounds
With fanout 2, everyone knows after 6 rounds. Doubling the cluster adds only about one more round: spread grows like log(n).
Peers told per round
1 2 Informed nodes roughly double each round, so even huge clusters converge in a handful of rounds.
Redundant messages are the price of robustness.
3 4
In production
Tools and technologies
Gossip runs membership in many distributed databases.
Not tied to one language — use these names when you search docs or design a system.