Bird
Raised Fist0
HLDsystem_design~10 mins

Gossip protocol in HLD - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to identify the main purpose of a gossip protocol.

HLD
The gossip protocol is mainly used for [1] information among nodes in a distributed system.
Drag options to blanks, or click blank then click option'
Asynchronizing
Bblocking
Cencrypting
Disolating
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing options related to security or blocking instead of sharing.
2fill in blank
medium

Complete the code to describe how nodes select peers in gossip protocol.

HLD
In gossip protocol, each node randomly selects [1] to exchange information with during each round.
Drag options to blanks, or click blank then click option'
Aall nodes
Bonly itself
Cone or more peers
Da central server
Attempts:
3 left
💡 Hint
Common Mistakes
Assuming communication is with all nodes or a central server.
3fill in blank
hard

Fix the error in the description of gossip protocol's fault tolerance.

HLD
Gossip protocol is [1] to node failures because information is spread redundantly across many nodes.
Drag options to blanks, or click blank then click option'
Aresistant
Bdependent
Cvulnerable
Dunaware
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'vulnerable' which is the opposite of correct meaning.
4fill in blank
hard

Fill both blanks to complete the description of gossip protocol's message complexity and convergence.

HLD
The message complexity per round is typically [1], and the protocol converges in [2] rounds.
Drag options to blanks, or click blank then click option'
AO(n)
BO(1)
Clog n
Dn^2
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing message complexity with total messages in the network.
5fill in blank
hard

Fill all three blanks to complete the pseudocode for a gossip protocol round.

HLD
def gossip_round(node):
    peer = node.[1]()
    data_to_send = node.[2]()
    peer.[3](data_to_send)
Drag options to blanks, or click blank then click option'
Aselect_random_peer
Bget_updates
Csend_updates
Dbroadcast
Attempts:
3 left
💡 Hint
Common Mistakes
Using broadcast instead of sending to one peer.