Docker, Compose, External IP and Scaling

There has not been any good way to do this in Docker… at least not that I know of.

Zookeeper 3.5 now supports cluster re-assignment so it’s possible to run the command once the containers are up, but it’s not ideal.
In the end, for ZK at least, a fi set of 3 or 5 nodes is fine. For Kafka, I use ZK to register the nodes, and I had created ID by using the container IP without the dots. This works well to get unique IDs, but causes other problems since IP changes on restart… I kinda gave up on that.

I use Kubernetes now; it doesn’t solve everything but definitely helps as Services map to the pods/nodes of each container, and can be probed from within the container with the API.

2 Likes