I'm reading akka documentation and come up with some troubles of undertanding the way they implemented Gossip. (docs here). The part that confused me, (emphasized mine):
Periodically, the default is every 1 second, each node chooses another random node to initiate a round of gossip with. If less than ½ of the nodes resides in the seen set (have seen the new state) then the cluster gossips 3 times instead of once every second. This adjusted gossip interval is a way to speed up the convergence process in the early dissemination phase after a state change.
So, if the gossip round is in the beginning (less then ½ nodes have seen the current state), the nodes from seen set start sending 3 gossips a second instead of one. But if the gossip convergence happened how do they know about that (they still keep sending gossip 3 times a second). Or maybe convergence is gossiped throughout the cluster just as any other "cluster event"?
To find the cluster IP address of a Kubernetes pod, use the kubectl get pod command on your local machine, with the option -o wide . This option will list more information, including the node the pod resides on, and the pod's cluster IP. The IP column will contain the internal cluster IP address for each pod.
The olsnodes command provides the list of nodes and other information for all nodes participating in the cluster. You can use this command to quickly check that your cluster is operational, and all nodes are registered as members of the cluster.
As you may know gossip convergence happens when all nodes are seen (i.e all member nodes are in the seen list of Gossip event). If cluster is not converged ClusterDeamon speeds up the gossip.
def gossipTick(): Unit = {
gossip()
if (isGossipSpeedupNeeded) {
scheduler.scheduleOnce(GossipInterval / 3, self, GossipSpeedupTick)
scheduler.scheduleOnce(GossipInterval * 2 / 3, self, GossipSpeedupTick)
}
}
def isGossipSpeedupNeeded: Boolean =
(latestGossip.overview.seen.size < latestGossip.members.size / 2)
Once cluster has been converged, it falls back to normal scheduled gossip ticks using configured gossip interval. Have a look at source and test specs of this feature. Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With