Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zookeeper nodes should be ephemeral #30

Open
amarouni opened this issue Nov 2, 2017 · 1 comment
Open

Zookeeper nodes should be ephemeral #30

amarouni opened this issue Nov 2, 2017 · 1 comment

Comments

@amarouni
Copy link
Contributor

amarouni commented Nov 2, 2017

The znodes created by Akka cluster members are not ephemeral which sometimes leads to the following odd situation :

  • Start a new application with a single Akka cluster node using default constructr-zookeeper configuration (max 2 seed nodes)
  • The Akka cluster node adds itself to the zookeeper nodes list and everything works as expected
  • The list in zookeeper contains the node's actor address (with its current IP address)

Now when the Akka cluster node is restarted, and gets a new IP address, it goes through the usual states and finds its old node address in the nodes list (with the old IP address)

  • It tries to use it to join the cluster, but since the IP address is unreachable the node times out and kills the ActorSystem bringing with it the whole application.

If the node created by the Akka cluster node was ephemeral, it would have been cleaned out by zookeeper when the session expired (node went down). So upon restart it would have found no existing nodes and would have registered itself successfully.

Is there any reason why these nodes are not ephemeral ?

@markusjura
Copy link
Contributor

Addressed by #31.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants