Intermediate Topic 29 of 51 Distributed Systems & Cloud
Gossip Protocols
Epidemic-style information spreading.
How it works
Gossip protocols spread information the way rumors or epidemics do: periodically each node picks a few random peers and exchanges state with them, so updates reach all nodes in about O(log n) rounds with high probability. Variants include push, pull and push-pull, anti-entropy to reconcile differences and rumor mongering that stops once the news is old. They are simple, scalable, robust against failures and need no central coordinator, providing eventual consistency.
Where it is used
Membership and failure detection in Cassandra, Consul and Serf, cluster state dissemination in Redis Cluster, aggregation of metrics and propagation of configuration in large clusters use gossip, with SWIM as a popular protocol.
Common pitfall
Information spread is probabilistic and eventual, with no hard bounds, and convergence time depends on fanout and interval. Messages can amplify network load with large state, so send digests or deltas. Detecting failures accurately versus quickly is a trade-off. Secure gossip against malicious peers with authentication, and tune fanout and period.
Where it fits in the course
Gossip Protocols is topic 29 of 51 in Distributed Systems & Cloud, rated Intermediate. It follows Distributed Hash Tables. The next topic is Failure Detectors.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Distributed Systems & Cloud quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Distributed Systems & Cloud quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Gossip Protocols?
Where do people use Gossip Protocols?
What is the most common mistake with Gossip Protocols?
What should I learn before this topic?
How can I practice it?
Is Gossip Protocols hard to learn?
How long does it take to learn Gossip Protocols?
Which topics are related to Gossip Protocols?
What should I study after Gossip Protocols?
Related topics
- Distributed Hash Tables (Distributed Systems & Cloud)
- Failure Detectors (Distributed Systems & Cloud)
- Consistent Hashing (Distributed Systems & Cloud)
- Byzantine Fault Tolerance (Distributed Systems & Cloud)
- Email Protocols (Computer Networks)