Setting up the discovery service
One of the major problems with running services in a shared environment is the network. How can we make sure services can talk to each other while they could be spawned on different machines and ports? In this recipe, you will learn how to run the discovery service for Marathon to enable services to find each other and we will use the proxy approach with Traefik.
Getting ready
Before you start, ensure Marathon is up and running.
How to do it...
This solution is recommended for small and medium sized clusters with fewer than hundreds of services and fewer than thousands of instances with moderate traffic. With bigger clusters, you will probably need a different approach than a central proxy, such as consul, where you can use allegro/marathon-consul.
Before we start to think about where the proxy should be placed, remember that the more nodes you have, the more proxies you will need. On the other hand, each proxy will query Marathon so it will decrease performance...