In this recipe, we will learn the concepts of Marathon LB and how it works behind the screens. At the time of writing this, Marathon LB works perfectly with DC/OS. So trying to make Marathon LB work in a non-DC/OS environment might not be the best solution in all cases. We will be learning about DC/OS in Chapter 8 , More Clustering Frameworks - DC/OS, Docker Swarm, and YARN.
Marathon LB is a Python-based tool that internally uses HAProxy to load-balance applications deployed on Marathon. HAProxy is one of the proven solutions for load-balancing HTTP-based endpoints. It has been there in the market for a while, and there are several success stories about it. When you start Marathon LB, you need to supply the base URL of Marathon as a configuration so that when Marathon LB starts, it knows where Marathon is running on your cluster. Marathon LB binds to the service ports of all the applications and routes any request that it...