LeanerCloud / AutoSpotting

Saves up to 90% of AWS EC2 costs by automating the use of spot instances on existing AutoScaling groups. Installs in minutes using CloudFormation or Terraform. Convenient to deploy at scale using StackSets. Uses tagging to avoid launch configuration changes. Automated spot termination handling. Reliable fallback to on-demand instances.
https://autospotting.io
Open Software License 3.0
2.34k stars 313 forks source link

Consider ENI capacity when determining instance compatibility #409

Open gabegorelick opened 4 years ago

gabegorelick commented 4 years ago

Github issue

Issue type

Summary

Each instance type has a maximum number of network interfaces that it can have. See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI. AutoSpotting should consider this when deciding if a spot instance is compatible with the currently running instance.

Maximum ENIs is important for containerized workloads like Kubernetes and ECS which often grant each container its own ENI. So instances with fewer ENIs mean they can run fewer containers.

Max network interfaces per instance type info appears to be available from https://www.ec2instances.info, so AutoSpotting should be able to use it.

Steps to reproduce

  1. Have an ASG with t3.small instances
  2. Let AutoSpotting replace them with t3a.small

Expected results

Your new instances can have the same number of ENIs.

Actual results

New instances can have fewer ENIs.

cristim commented 1 year ago

@gabegorelick are you still interested in this use case?

gabegorelick commented 1 year ago

@cristim Not at the moment. I changed jobs and no longer use AutoSpotting, although I may use it again in the future.

cristim commented 1 year ago

@gabegorelick do you know if it's still being used at your previous employer?

If that's the case I'd love if you could put me in touch with some of your former colleagues.

BTW, you may find this useful, I just released it last week: https://github.com/LeanerCloud/savings-estimator/