Lattice is a light-weight, open source tool for clustering containers. Containers in a Lattice cluster are long-running processes or one-time tasks that are scaled and scheduled dynamically. Apps running in containers have to use external services, such as MySQL, RabbitMQ, etc., but if these services are dynamic, you cannot hardcode their IPs to the client.
The solution is to use a service discovery product, such as Consul, a highly available, distributed tool for discovering and configuring services. In this tutorial, I describe how an app running in Lattice can discover a MySQL service with Consul.