Bird
Raised Fist0
HLDsystem_design~12 mins

Gossip protocol in HLD - Architecture Diagram

Choose your learning style9 modes available
System Overview - Gossip protocol

The Gossip protocol is a method used in distributed systems to spread information quickly and reliably among many nodes. Each node randomly shares updates with a few other nodes, which then continue spreading the information, similar to how gossip spreads in social groups. This approach ensures scalability, fault tolerance, and eventual consistency.

Architecture Diagram
          +---------+           +---------+           +---------+
          | Node A  |<--------->| Node B  |<--------->| Node C  |
          +---------+           +---------+           +---------+
               ^                     ^                     ^
               |                     |                     |
          +---------+           +---------+           +---------+
          | Node D  |<--------->| Node E  |<--------->| Node F  |
          +---------+           +---------+           +---------+
Components
Node A
service_node
Participates in gossip by sending and receiving updates.
Node B
service_node
Participates in gossip by sending and receiving updates.
Node C
service_node
Participates in gossip by sending and receiving updates.
Node D
service_node
Participates in gossip by sending and receiving updates.
Node E
service_node
Participates in gossip by sending and receiving updates.
Node F
service_node
Participates in gossip by sending and receiving updates.
Request Flow - 6 Hops
Node ANode B
Node BNode C
Node CNode F
Node FNode E
Node ENode D
Node DNode A
Failure Scenario
Component Fails:Node C
Impact:Node C stops forwarding updates, slowing information spread to nodes connected through it.
Mitigation:Other nodes detect missing updates and choose alternative nodes to gossip with, ensuring continued propagation.
Architecture Quiz - 3 Questions
Test your understanding
What is the main purpose of the Gossip protocol in this system?
ATo authenticate users
BTo store data permanently
CTo spread information quickly and reliably among nodes
DTo balance load between servers
Design Principle
The Gossip protocol uses peer-to-peer communication where each node randomly shares updates with others. This design ensures the system scales well and remains fault tolerant because information spreads even if some nodes fail.