Docker Community Forums

Share and learn in the Docker community.

Service Discovery with Automatic Load Balancing - Haystack

dns
dockerhub
docker

(Peter Morgan) #1

Hello -

I have been thinking about two problems: service discovery and the automated load balancing of services as they are scaled up or down to meet demand (particularly for systems that experience large spikes or troughs).

I have also been working on a solution: Haystack is an Apache licensed DNS based service discovery and automatic load balancer. It manages service discovery by monitoring the container lifecycle through the docker API. It introspects container metadata exposing available services within its own DNS. It also includes a HTTP load balancer - as services start or stop they are maintained in a service group that is automatically load balanced for the clients. It is also integrated with Swarm and overlay based networks.

I have written a blog describing it in more detail: Service Discovery and Load Balancing with Haystack. I also have a demo script showing load balancing of some HTTP based micro services. Haystack is available as a single 27MB docker container on the hub [shortishly/haystack].

I am looking forward to some feedback from the Docker community.