Thanks to cloud, auto scaling applications has become nearly synonymous with scalability. If you can’t support auto scaling, you aren’t scalable by most folks’ estimation.
Auto scaling apps in any environment – cloud, container, or traditional for that matter – relies heavily on coordinating specific actions across multiple systems. That coordination is achieved via APIs. Which are the cornerstone of both cloud and containerized environments.
Until recently, auto scaling apps with Mesos was a mostly manual endeavor. Which probably worked fine for the more than half (51%) of Mesos users (according to their survey) who looked to containers for deploying monolithic and legacy applications. But for those adopting Mesos for greater efficacy of resources and agility through scalability, it’s not sustainable. Anytime you must fallback to manual methods of scaling apps you run the risk of human error and incur operational costs that increase the cost per transaction. People don’t work for free, after all, and if they’re spending time on scaling apps up and down, they aren’t able to work on other projects that may be vital to the growth and success of the organization. Too, costs per transaction is an important metric for cloud and container environments, as their efficacy is in part desired to keep those costs down. The more it costs per transaction, the less profit or productivity is realized. And both are important measures of business health these days.
Gaurav Kumar, an engineer at an early enterprise adopter of Mesos, met this challenge in a manner consistent with an open source attitude: he built one. Because APIs and open source enable communities and customers to do that kind of thing.

To enable auto scaling of apps within Mesos with an F5 BIG-IP required two existing open source solutions:
- F5 Container Connector for Marathon, which is responsible for listening for Marathon events and then configuring a BIG-IP appropriately.
- A Prometheus exporter for BIG-IP metrics forked from an existing open source project - BIG-IP Exporter - which collects relevant telemetry (number of TCP connections, HTTP requests, etc…) from a BIG-IP.
Kumar then developed the third leg of this solution, the “F5 based autoscaling component for DCOS/Marathon services” (called ‘F5 Autoscaler’).
The F5 Autoscaler component fetches statistics from the F5 Exporter and compares them to defined thresholds. When one of those thresholds is reached, the F5 Autoscaler puts in a scaling request to the DCOS master to add a pool member. Marathon fulfills that request as it normally would, by deploying a new container/app instance and then notifying the BIG-IP via the F5 Container Connector for Marathon, which configures the BIG-IP with the new pool member.
Voila! Auto scaling apps.
This solution is a great example of how open source enables organizations to do more than just reduce costs and time to market. It provides a framework for solving real business challenges.
Open source software highlighted in this spotlight:
- F5 Marathon Autoscaler (github) (Docker) – Contributed by Gaurav Kumar
- F5 Exporter (github) - Contributed by ExpressenAB
- Prometheus F5 Exporter (github) – Contributed by Gaurav Kumar
- F5 Container Connector (github) (Docker)- Contributed by F5 Networks
- DC/OS
- Marathon
About the Author

Related Blog Posts
F5 NGINX Gateway Fabric is a certified solution for Red Hat OpenShift
F5 collaborates with Red Hat to deliver a solution that combines the high-performance app delivery of F5 NGINX with Red Hat OpenShift’s enterprise Kubernetes capabilities.

F5 accelerates and secures AI inference at scale with NVIDIA Cloud Partner reference architecture
F5’s inclusion within the NVIDIA Cloud Partner (NCP) reference architecture enables secure, high-performance AI infrastructure that scales efficiently to support advanced AI workloads.
F5 Silverline Mitigates Record-Breaking DDoS Attacks
Malicious attacks are increasing in scale and complexity, threatening to overwhelm and breach the internal resources of businesses globally. Often, these attacks combine high-volume traffic with stealthy, low-and-slow, application-targeted attack techniques, powered by either automated botnets or human-driven tools.
F5 Silverline: Our Data Centers are your Data Centers
Customers count on F5 Silverline Managed Security Services to secure their digital assets, and in order for us to deliver a highly dependable service at global scale we host our infrastructure in the most reliable and well-connected locations in the world. And when F5 needs reliable and well-connected locations, we turn to Equinix, a leading provider of digital infrastructure.
Volterra and the Power of the Distributed Cloud (Video)
How can organizations fully harness the power of multi-cloud and edge computing? VPs Mark Weiner and James Feger join the DevCentral team for a video discussion on how F5 and Volterra can help.
Phishing Attacks Soar 220% During COVID-19 Peak as Cybercriminal Opportunism Intensifies
David Warburton, author of the F5 Labs 2020 Phishing and Fraud Report, describes how fraudsters are adapting to the pandemic and maps out the trends ahead in this video, with summary comments.
