Recent versions of Docker include a simple DNS server for the discovery of containers, and the ability to scale up or down the number of containers running a particular service. Here’s how you can use nginx as a front-end to such a system.
For more info see http://statusq.org/archives/2016/07/03/7691/ .