Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic instance type information #441

Open
cristim opened this issue Oct 16, 2020 · 5 comments
Open

Dynamic instance type information #441

cristim opened this issue Oct 16, 2020 · 5 comments

Comments

@cristim
Copy link
Member

cristim commented Oct 16, 2020

Github issue

Issue type

  • Feature Idea

Summary

Currently AutoSpotting ships with a static instance type database originating from ec2instances.info. This is very efficient but it only supports commercially available regions, may get stale over time and requires software updates to get support for newer instance types.

Ideally this data should be fetched periodically and cached by the Lambda function in its scratch area.

One option could be to just fetch it from somewhere at startup and update it daily, or alternatively query this data directly from the AWS pricing API.

@gjmveloso
Copy link
Contributor

The new (last year) API DescribeInstanceTypes along with Query API for AWS Pricing allow us to fetch prices and instance attributes in realtime.

@cristim
Copy link
Member Author

cristim commented Nov 11, 2020

Thanks @gjmveloso, I'm well aware of those APIs, it's just that last time I tried they werr relatively slow and resource-intensive, not very well suited for using them from a Lambda function, unless we can somehow cache the data between runs assuming the Lambda function is kept warm.

The data we get from ec2instances.info is generated using those APIs pretty frequently but it's much more space and time efficient for running from a Lambda function.

The current drawback is the fact that data and code are currently coupled so we need to upgrade the code when upgrading the instance type data. The next thing on my to-do list is to decouple them and potentially offer a data upgrade service to my paying subscribers if they express significant interest in this.

@gjmveloso
Copy link
Contributor

Never heard about https://github.com/banzaicloud/cloudinfo before. It may be a potential prior art work that could be used here

@cristim
Copy link
Member Author

cristim commented Apr 1, 2021

Thanks,I'll have a look at this when I get to work on this issue

@cristim
Copy link
Member Author

cristim commented Mar 6, 2023

I've started working on this functionality a while back and added support for updating instance type data in the https://github.com/LeanerCloud/ec2-instances-info library we use.

I also looked into the Banzaicloud solution but at a first glance it seemed tightly coupled with their Pipeline setup so decided not to use it, or at least in the first iteration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants