4 ms·
The less mature piece of the puzzle for that is service discovery. So instead of your apps having hard coded endpoints, they go to some config file, zookeper,
by benjaminwootton 13y ago
The less mature piece of the puzzle for that is service discovery.
So instead of your apps having hard coded endpoints, they go to some config file, zookeper, etcd to find the services. Your config management piece can register endpoints with the same directories as they come online.
An alternative is just to register with a load balancer dynamically.
This bit does take work but it gives your system a very nice dynamic fungible property.
Happy to discuss more offline with anyone as I'm a massive advocate of docker now! Same username at Twitter.
- shykes 13y agoThanks for the solid explanations Benjamin. Docker will soon offer a better solution to service discovery. It will allow taking advantage of the various SD tools out there (zookeeper, etcd, synapse/haproxy, skynet, serf) while keeping your containers compatible with all of them. This will help keep all docker containers compatible with each other, instead of fragmenting them among mutually incompatible service discovery protocols. Happy to chat about it more on irc - #docker and #docker-dev on Freenode.
- mikebabineau 13y ago"an alternative is to register with a load balancer dynamically" To expand on this, a common pattern is to have a local proxy installed on each host machine. To route traffic to a new container, one simply updates the config for the local nginx/haproxy/hipache/other proxy. A second layer of load balancing exposes the singular, top-level endpoint. All Docker hosts are registered with this LB, but those without live containers for a given service are simply "out of rotation" for that endpoint (health check failure). This simplifies the service discovery aspect for architectures not already using a more sophisticated mechanism.