You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using ec2-instance-selector as a library in an always running application, it would be nice to have DescribeInstanceTypes and DescribeInstanceTypeOfferings calls cached. EC2 instance types don't change too often, so this cache is probably safe to stick around for hours but even moderate caching on the order of minutes could save many API calls.
I would envision the cache to be on by default with a conservative TTL of 15 minutes. A public method will need to be defined to clear the cache and to refresh the cache. The lib consumer could use the refresh in a ticker go routine to periodically refresh the cache without taking the cache miss latency hit. ec2-instance-selector could also providethe function that a user could kick off in a go routine for refresh.
The text was updated successfully, but these errors were encountered:
When using ec2-instance-selector as a library in an always running application, it would be nice to have DescribeInstanceTypes and DescribeInstanceTypeOfferings calls cached. EC2 instance types don't change too often, so this cache is probably safe to stick around for hours but even moderate caching on the order of minutes could save many API calls.
I would envision the cache to be on by default with a conservative TTL of 15 minutes. A public method will need to be defined to clear the cache and to refresh the cache. The lib consumer could use the refresh in a ticker go routine to periodically refresh the cache without taking the cache miss latency hit. ec2-instance-selector could also providethe function that a user could kick off in a go routine for refresh.
The text was updated successfully, but these errors were encountered: