Marathon-LB is based on HAProxy, a rapid proxy and load balancer. HAProxy provides proxying and load balancing for TCP and HTTP based applications, with features such as SSL support, HTTP compression, health checking, Lua scripting and more. Marathon-LB subscribes to Marathon’s event bus and updates the HAProxy configuration in real time.
You can can configure Marathon-LB with various topologies. Here are some examples of how you might use Marathon-LB:
- Use Marathon-LB as your edge load balancer and service discovery mechanism. You could run Marathon-LB on public-facing nodes to route ingress traffic. You would use the IP addresses of your public-facing nodes in the A-records for your internal or external DNS records (depending on your use-case).
- Use Marathon-LB as an internal LB and service discovery mechanism, with a separate HA load balancer for routing public traffic in. For example, you may use an external F5 load balancer on-premise, or an Elastic Load Balancer on Amazon Web Services.
- Use Marathon-LB strictly as an internal load balancer and service discovery mechanism.
- You might also want to use a combination of internal and external load balancers, with different services exposed on different load balancers.
Here we discuss Marathon-LB as an edge load balancer and as an internal and external load balancer.
Marathon-LB as an edge load balancer
Figure 1. Marathon-LB as load balancer
Marathon-LB as an internal and external load balancer
Figure 2. Marathon-LB as internal and external load balancer
More information for Marathon-LB can be found on the GitHub page.
Marathon-LB Release Notes
Release notes for Marathon-LB…Read More
Installing and Customizing on DC/OS Open Source
Installing and customizing Marathon-LB on DC/OS Open Source…Read More
Install and Customize on DC/OS Enterprise
Installing and customizing Marathon-LB on DC/OS Enterprise…Read More
Provisioning Marathon-LB with a service account…Read More
Marathon-LB works by automatically generating configuration for HAProxy and then reloading HAProxy as needed. Marathon-LB generates the HAProxy configuration based on application data available from the Marathon API. It can also subscribe to the Marathon Event Bus for real-time updates. When an application starts, stops, relocates or has any change in health status, Marathon-LB will automatically regenerate the HAProxy configuration and reload HAProxy.…Read More
Tutorial - Deploying an Externally Load Balanced App with Marathon-LB
Tutorial - Using Marathon-LB to run a containerized DC/OS service that serves a website…Read More
Deploying an Internally and Externally Load Balanced App with Marathon-LB
Tutorial - Using Marathon-LB as an internal and external load balancer…Read More