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

"Using Docker Swarm when running Zookeeper"? #16

Closed
bluepuma77 opened this issue Jun 3, 2017 · 5 comments
Closed

"Using Docker Swarm when running Zookeeper"? #16

bluepuma77 opened this issue Jun 3, 2017 · 5 comments

Comments

@bluepuma77
Copy link

I found this sentence in the Readme to be really promising:

Consider using Docker Swarm when running Zookeeper in replicated mode.

Is this actual possible to run Zookeeper with Docker Swarm on multiple servers? In "real" swarm mode, where I can easily just scale it up from 3 to 5 servers? How would I do that? Don't I need to set all other Zookeeper server (IP) addresses via environment variable?

So far I found only Elastic to be easily docker-swarm-scalable, thanks to DZone. Would love to see this possible with Zookeeper, Apache Kafka, Apache NiFi and Hadoop/HDFS.

@si-harps
Copy link

si-harps commented Aug 2, 2017

Is there any update on this? I'm keen to run a zookeeper ensemble across a Docker Swarm. It's unclear how to set the required variables (ZOO_MY_ID, ZOO_SERVERS) when deploying a stack either globally or using replicas. Any feedback would be much appreciated.

@31z4
Copy link
Owner

31z4 commented Aug 12, 2017

The solution for dynamic scaling will be pretty complicated. You would have to use Consul as a service registry and Consul Template to change Zookeeper configuration when new container is added or an existing container removed. And then you also have to restart all your Zookepers because prior to version 3.5 it doesn't support dynamic reconfiguration.

A similar solution for scaling Nginx is described in this article.

But it general it seems like dynamic scaling isn't that useful for Zookeeper for several reasons

  1. It doesn't scale for writing. In fact addind new nodes increase reliability at the cost of write speed.
  2. Usually you decide how many node failures you'd like to tolerate in advance. And often it's no use of running more than 5 nodes.

@31z4
Copy link
Owner

31z4 commented Aug 15, 2017

I guess that's what folks from Bandsintown did in their fork.

@31z4
Copy link
Owner

31z4 commented Nov 1, 2017

Implementing dynamic scaling has become a bit easier with the introduction of the 3.5.3-beta tag. Because starting from 3.5 Zookeeper now supports dynamic reconfiguration.

@31z4
Copy link
Owner

31z4 commented Dec 16, 2018

Closing it because the issue seems to be inactive for quite some time now.

@31z4 31z4 closed this as completed Dec 16, 2018
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

3 participants