Chen we talk about Gossip Protocol, we talk about a communication protocol that digital devices use to propagate information on a peer-to-peer network (P2P). In blockchain networks, this protocol is used by network nodes to share and disclose information quickly and reliably with each other.
The Gossip name for this protocol derives from the way information is spread through social networks. Gossip in Spanish means gossip or rumor; so the Gossip Protocol is inspired by this form of information disclosure that occurs very quickly and quickly on these networks. Currently, there are many variations of this communication protocol. Many are applied according to the needs or requirements of each user or each of the networks that use it.
Origin of the Gossip protocol
The origin of this protocol is related to the epidemic replication algorithms described by Demers Alan, Greene Dan, Hauser Carl, Irish Wes, Larson John, Shenker Scott, Sturgis Howard, Swinehart Danm and Terry Doug in their study. "Epidemic Algorithms for Replicated Database Maintenance" of 1987.
Since the appearance of this study, the epidemic spread has aroused great interest in computing. This is because its operating system is perfect for large networks with high levels of decentralization. In fact, the first practical uses of Gossip-type protocols can be seen in the routing systems of the first networks that were the preamble to the Internet that we enjoy today.
How does the Gossip Protocol work?
Gossip's protocols work very simply. This is because they are based on a very basic concept for distributing and propagating information across a network. In these protocols, for a node to distribute information, it must only be paired with other nodes randomly. Once this occurs, you should only exchange the information received with said nodes, who in turn will distribute the information with other nodes to which they are also paired. Forming a distribution chain to spread the information throughout the network in a timely and efficient way.
For its part, the way in which information is propagated within a peer-to-peer network through the Gossip Protocol occurs quickly and safely as long as the involved nodes can guarantee the propagation and disclosure of the information without discriminating or excluding any of the parties in their own network.
Gossip Protocol is based on the probabilistic distribution of the information selecting pairs, to whom the nodes will distribute the information. This in order that information is not repeated or duplicated to a node that already knows it. For example, in the case of a work team that constantly meets to keep up to date with everything that happens within the office, applying the Gossip protocol each of the team members must be paired with another member with whom they will share the information. This team member will in turn be paired with another to whom they will also have to distribute the same information and so on so that everyone is kept informed.
When it comes to the fact that the Gossip protocols are based on probability to distribute the information, it is because a node must randomly choose which other node wants to share that information. Furthermore, this communication protocol is scalable, because the nodes only share or distribute a fixed amount of information, regardless of whether another node fails in its work. Operating nodes will always be sharing the corresponding amount of information with their peer network.
To see more easily how the protocol works, see the following example in the image slider.
Objective of a Gossip Protocol
The main objective of a Gossip Protocol is to disseminate information as quickly as possible through a vast network of distributed nodes. To achieve this, these types of protocols start from the basic idea that processes that communicate regularly with their peers. During this communication they are able to exchange information by creating a high frequency and data flow over the network. And all this in a dispersion pattern that helps the information to be distributed as quickly as possible throughout the network.
An example of these can be seen for example on Usenet and IRC. Both systems, despite being centralized, distributed news very quickly through the network using “whispers”. But perhaps the best example of this operation can be seen in the routing system that makes the Internet possible. Such routing protocols allow routers to exchange information with neighboring routers, thereby improving the routing tables for the entire network. In the end, the network always seeks to build a more optimal version of itself through the shortest routing between all its parts.
This situation is very useful in building a blockchain network. Since a widely distributed network would greatly benefit from this type of operation. This way, the resources that are part of it are used to the maximum. The result is that a transaction in a network with Gossip Protocol, would travel quickly through all the nodes of the network, reducing attacks in the middle of its dispersion.
And to think that all this functionality is thought around pandemic dispersal studies and a simple proverb:
"Anyone can start a gossip, but no one can stop it."
Gossip Protocol types
Information dissemination or propagation protocols are those that operate under group or multicast communication for the dissemination of messages. In the first case, under group communication, the peer network nodes are always in constant communication. So the information can be distributed to the network quickly and reliably. Although it may be the case that when propagating information, it has already changed and is slightly obsolete. Although, in general, this does not represent a concern or a problem for the network.
In the second case, under multicasting, the information is occasionally spread over the peer network. So an event does not immediately trigger the spread of information. In this case, the latency of the information can be a concern, due to the time that elapses from the information is created until it is disseminated over the network.
In aggregation protocols, the peer network nodes receive and process information, to send a summary of this information to the other nodes connected to the network. This information distribution mechanism keeps a record of all processed data. This process is known as distributed data mining, which is widely used in distributed ledger technology.