Grokking the System Design Interview, Volume II
0% completed
10. Gossip Protocol
Every node in a cluster needs to know the state of every other node, but checking each one directly does not scale. Gossip protocol solves this by having nodes share state with one random node at a time.
Background
In a large cluster with no central node, how does one node learn the current state of every other node? The simplest approach is a heartbeat between every pair of nodes. When a node goes down, it stops sending heartbeats, and every other node notices right away.
The problem is the cost. Every tick sends O(N^2) messages, where N is the number of nodes
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%