cluster-autoscaler/aws: batch launch config query and ttl cache #2840
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR improve our caching strategy of the launch configuration name to instance type.
It adds a TTL and batch the query to populate this cache.
It happens that users change the instance type of an already running ASG and that become an issue forcing to restart the cluster-autoscaler.
Note that it's also an issue to have nodes compared to a template of nodes but that's an another topic I'd like to open in a dedicated thread.
In a cluster with more than 1300 ASGs, the query to the launch configuration API done one by one become a throttling situation.
Doing that by batching these call by page of 50 elements solved our throttling issue.