An Automatic And Reliable Solution For Managing Spot Instances
Saving Rungway 80% of their EC2 costs
Rungway started as a small startup, that was in a need of its own infrastructure. Rungway searched for the best value for their money and like any other startup, they couldn’t afford to build their own Data Center.
They thought the best available solution was running their workload on AWS on-demand instances but quickly they faced large expanses.
This led Rungway to look for an alternative solution to reduce cloud costs and they started experimenting with the
AWS Spot Market. Managing spot instances on the Spot Market are 70-80% lower than on-demand instances.
Unfortunately, Rungway faced a lot of issues managing spot instances by themselves. The instances were terminated every couple of days and they needed to develop procedures and scripts that will handle the spot instances termination. In search of an automatic and reliable solution for managing spot instances, Endre Czirbesz, Lead Software Engineer at Rungway, found Spot. Today, Spot is a major element of their spot instance cost-reduction strategy.
Rungway started to develop
micro-services based on containers and found that Spot integration with
Amazon ECS was a perfect match. Spot product, Elastigroup uses
Amazon ECS API that calls to communicate with the ECS cluster’s scheduler to make sure your desired
Services are operating as expected. Whenever an EC2 Instance is scheduled for replacement, whether it’s due to Scaling Down or a Spot Replacement, Elastigroup invokes the
deregistercontainerinstance value to notify the ECS scheduler. This forces rescheduling on the containers that run on the hosts as well as safely drain the Instance from the attached
Elastic Load Balancers.
Through collaboration with Spot managing spot instances, Rungway has saved money while maintaining the performance of its platform. Endre says,
“Spot has saved tens of thousands of dollars. I was able to maintain good performance more easily, while further reducing infrastructure costs.”
It took them just a few days to configure its infrastructure to run on spot instances.
“Our setup is complicated because we have a lot of different ECS groups, but the Spot dashboard is easy to work with and we get a good overview of stats.”