Gossip convergence cannot occur while any nodes are unreachable. The nodes need to become reachable again, or moved to the down and removed states (see the Membership Lifecycle section below). This only blocks the leader from performing its cluster membership management and does not influence the application running on top of the cluster. For example this means that during a network partition it is not possible to add more nodes to the cluster. The nodes can join, but they will not be moved to the up state until the partition has healed or the unreachable nodes have been downed.
After gossip convergence a leader for the cluster can be determined. There is no leader election process, the leader can always be recognised deterministically by any node whenever there is gossip convergence. The leader is just a role, any node can be the leader and it can change between convergence rounds. The leader is simply the first node in sorted order that is able to take the leadership role, where the preferred member states for a leader are up and leaving (see the Membership Lifecycle section below for more information about member states).
root@trading-portfolio-0:/stashaway# iptables -A OUTPUT -p tcp --dport 2551 -j DROP
root@trading-portfolio-0:/stashaway# iptables -A INPUT -p tcp --dport 2551 -j DROP
{
"selfNode": "akka.tcp://PortfolioService@trading-portfolio-0:2551",
"leader": "akka.tcp://PortfolioService@trading-portfolio-0:2551",
"oldest": "akka.tcp://PortfolioService@trading-portfolio-0:2551",
"unreachable": [
{
"node": "akka.tcp://PortfolioService@trading-portfolio-1:2551",
"observedBy": [
"akka.tcp://PortfolioService@trading-portfolio-0:2551"
]
},
{
"node": "akka.tcp://PortfolioService@trading-portfolio-2:2551",
"observedBy": [
"akka.tcp://PortfolioService@trading-portfolio-0:2551"
]
}
],
"members": [
{
"node": "akka.tcp://PortfolioService@trading-portfolio-0:2551",
"nodeUid": "1583081060",
"status": "Up",
"roles": []
},
{
"node": "akka.tcp://PortfolioService@trading-portfolio-1:2551",
"nodeUid": "1689105132",
"status": "Up",
"roles": []
},
{
"node": "akka.tcp://PortfolioService@trading-portfolio-2:2551",
"nodeUid": "-763138964",
"status": "Up",
"roles": []
}
]
}
{
"selfNode": "akka.tcp://PortfolioService@trading-portfolio-1:2551",
"leader": "akka.tcp://PortfolioService@trading-portfolio-1:2551",
"oldest": "akka.tcp://PortfolioService@trading-portfolio-0:2551",
"unreachable": [
{
"node": "akka.tcp://PortfolioService@trading-portfolio-0:2551",
"observedBy": [
"akka.tcp://PortfolioService@trading-portfolio-1:2551",
"akka.tcp://PortfolioService@trading-portfolio-2:2551"
]
}
],
"members": [
{
"node": "akka.tcp://PortfolioService@trading-portfolio-0:2551",
"nodeUid": "1583081060",
"status": "Up",
"roles": []
},
{
"node": "akka.tcp://PortfolioService@trading-portfolio-1:2551",
"nodeUid": "1689105132",
"status": "Up",
"roles": []
},
{
"node": "akka.tcp://PortfolioService@trading-portfolio-2:2551",
"nodeUid": "-763138964",
"status": "Up",
"roles": []
}
]
}
{
"selfNode": "akka.tcp://PortfolioService@trading-portfolio-2:2551",
"leader": "akka.tcp://PortfolioService@trading-portfolio-1:2551",
"oldest": "akka.tcp://PortfolioService@trading-portfolio-0:2551",
"unreachable": [
{
"node": "akka.tcp://PortfolioService@trading-portfolio-0:2551",
"observedBy": [
"akka.tcp://PortfolioService@trading-portfolio-1:2551",
"akka.tcp://PortfolioService@trading-portfolio-2:2551"
]
}
],
"members": [
{
"node": "akka.tcp://PortfolioService@trading-portfolio-0:2551",
"nodeUid": "1583081060",
"status": "Up",
"roles": []
},
{
"node": "akka.tcp://PortfolioService@trading-portfolio-1:2551",
"nodeUid": "1689105132",
"status": "Up",
"roles": []
},
{
"node": "akka.tcp://PortfolioService@trading-portfolio-2:2551",
"nodeUid": "-763138964",
"status": "Up",
"roles": []
}
]
}
Hello everyone,Has some question regarding the leader election / Gossip Convergence in Akka Clustering.This link says :About Gossip Convergence:Gossip convergence cannot occur while any nodes are unreachable. The nodes need to become reachable again, or moved to the down and removed states (see the Membership Lifecycle section below). This only blocks the leader from performing its cluster membership management and does not influence the application running on top of the cluster. For example this means that during a network partition it is not possible to add more nodes to the cluster. The nodes can join, but they will not be moved to the up state until the partition has healed or the unreachable nodes have been downed.About Leader:After gossip convergence a leader for the cluster can be determined. There is no leader election process, the leader can always be recognised deterministically by any node whenever there is gossip convergence. The leader is just a role, any node can be the leader and it can change between convergence rounds. The leader is simply the first node in sorted order that is able to take the leadership role, where the preferred member states for a leader are up and leaving (see the Membership Lifecycle section below for more information about member states).And correct me if I am wrong, but my understanding is that the leader CANNOT be selected / elected /changed if the Gossip Convergence cannot happen. Therefore, if the cluster is experiencing the split-brain problem (one node being unreachable), it means that Gossip Convergence is not happening, therefore none of the nodes in the cluster should change its leader.
Question:Clearly, the Gossip Convergence occurred between the Node 1 and Node 2 themselves, and they decided to elect Node 1 as their new leader!Why is this happening? The Akka http management query result clearly states that Node 1 and Node 2 are not able to reach Node 0. And the Akka document states that "Gossip convergence cannot occur while any nodes are unreachable"?And it also says "After gossip convergence a leader for the cluster can be determined. There is no leader election process, the leader can always be recognised deterministically by any node whenever there is gossip convergence"Why and how Node 1 and Node 2 decided to elect Node 1 as their new leader? Why did they Gossip Converged without waiting for Node 0 to be either removed or joining them back...??Thanks,Joo
--
You received this message because you are subscribed to the Google Groups "Lagom Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lagom-framework+unsubscribe@googlegroups.com.
To post to this group, send email to lagom-framework@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lagom-framework/7e8760f5-6bab-4c5b-a362-0749365de6fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Patrik Nordwall
Akka Tech Lead
Lightbend - Reactive apps on the JVM
Twitter: @patriknw
To unsubscribe from this group and stop receiving emails from it, send an email to lagom-framewo...@googlegroups.com.
To post to this group, send email to lagom-f...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lagom-framework/7e8760f5-6bab-4c5b-a362-0749365de6fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.