Manh Do
Manh Do

Reputation: 43

Akka Cluster status Weakly Up

I read Akka document and found this

As mentioned before, if a node is unreachable then gossip convergence is not possible and therefore any leader actions are also not possible. By enabling akka.cluster.allow-weakly-up-members (enabled by default) it is possible to let new joining nodes be promoted while convergence is not yet reached. These Joining nodes will be promoted as WeaklyUp. Once gossip convergence is reached, the leader will move WeaklyUp members to Up.

But it doesn't explain what WeaklyUp status's purpose is. So, please help me to explain what difference is between WeaklyUp and Joining?

Upvotes: 4

Views: 488

Answers (1)

David Ogren
David Ogren

Reputation: 4810

The implications of WeaklyUp are application specific. (After all, as you point out, it's configurable whether WeaklyUp is even allowed.) WeaklyUp is a situation that indicates that a new node is in sync with the leader but that all nodes have not yet agreed on the state of new node (because convergence hasn't been reached and therefore a true Up state obtained).

What you do with a node in that state is somewhat up to you. For example, a WeaklyUp node could likely receive incoming traffic from the outside world. Since the WeaklyUp node knows the complete state of the cluster it would know how to handle all incoming requests, even requests that require cluster-aware routing.

Akka Bootstrap (by default), for example, will report a WeaklyUp node as "ready" to Kubernetes. Thereby making the WeaklyUp node eligible to receive incoming traffic. So that's the canonical answer to your question: a WeaklyUp node can receive and process requests and route messages to other nodes in the cluster. It can also receive responses, of course, since remoting works as normal. Another example is that WeaklyUp members are also eligible for cluster-aware routing. Since if the cluster-aware router is aware of the WeaklyUp node, the fact that some other node may not be aware of the WeaklyUp node is moot.

However, as the docs indicate, there are a lot of limitations to WeaklyUp members because not all members have seen the new node and so it can't be allowed to do anything that would depend on convergence: like participating in quorum decisions or sharding.

Upvotes: 3

Related Questions