Search code examples
amazon-ec2mesosmarathon

Dynamic Mesos cluster


I have recently started working with mesos and marathon. My goal is to have a dynamic cluster. In other words, allow Mesos to start slaves on EC2 on demand, and kill them as they get unused.I hope there is a solution, if Mesos notices that my build cluster is overloaded, it'll start instances and automatically connect them as Mesos slaves. When the load goes down, excessive EC2 instances will be terminated.


Solution

  • It's possible but so far haven't seen it widely used yet, I suppose mainly because the elasticity you seek is in fact delivered by Mesos itself. But if you want to do it, here's how (note that you'd want to run one Mesos agent per EC2 instance):

    • Preferably via an Auto Scaling Group that scales horizontally
    • Alternatively via the Autoscaler, scaling the sizes of your boxes (vertical scaling)