Alternative to AWS EC2 Autoscaling groups
-
We have a few hundred EC2 instances that are managed by Autoscaling Groups. For those who don't know what this is, Autoscaling groups allow you to define a VM template (launch tempate in AWS jargon) and instance types, and then you can easily scale from 0 to any number of EC2 instances. They all will use the same template, follow lifecycles (what to do before shutting down), and can even scale automatically (on a schedule, or using a lambda)
I now want to leverage our own hardware to accomplish something similar, and XCP-ng is one contender. Any ideas how I could accomplish something similar with XCP-ng? Thanks!
-
blackliner Hi !
I never use autoscale, but I would imagine something that can trigger a CI/CD when scaling is needed, and use terraform to deploy new VMs based on your template.Out of curiosity, what type of application are you running and need autoscaling ? And how new VM added via autoscaling are rejoining the other VMs to work together ?
(you gave me an idea :D)
-
AtaxyaNetwork Hi!
We use this for self hosted github action or buildkite CI runners.
- Managed runners are usually 5-20x more expensive
- We need stateful runners (vs ephemeral) for our bazel workloads to run optimally
- During busy hours we want to scale up our fleet, and overnight, when no code is being deceloped, we scale down to 0. This is achieved (more or less) through an AWS lambda function that sets the scale value based on the CI job queue.
How would scaling down look like with your proposed solution based on terraform?
-
blackliner Honestly I never had this use case, but I would imagine terraform has a feature for this.
I'll look into it, it's got me curious