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

perf(amazon): optimize target group loading for /loadBalancers #2610

Merged
merged 3 commits into from
May 8, 2018
Merged

perf(amazon): optimize target group loading for /loadBalancers #2610

merged 3 commits into from
May 8, 2018

Conversation

anotherchrisberry
Copy link
Contributor

Incremental update to the /{cloudProvider}/loadBalancers endpoint for AWS. By adding the target type to the target group key, we can fetch them all once and parse them instead of going to Redis once for each ALB and fetching the full target group details.

This is not going to be a major performance improvement on its own, I don't think: it seems like we're cutting the number of entries we get from Redis by about 33% (although that number would grow larger as ALBs supplant CLBs). The structure of the response to the call is much more complex than the comparable one to fetch all security groups - in addition to target groups, we include security group IDs associate with the load balancer for some reason, and I'm not sure who is using that data.

There are additional improvements we're considering making in Deck - mostly around not calling this endpoint unless we need to. At Netflix, over 99% of our clusters follow the established naming conventions, and use load balancers and target groups that are named after the application, so we'll have that data available when configuring a deployment cluster. We might as well just show that list and provide a link to "Show all Load Balancers" to enable the < 1% of users to pick load balancers from different applications.

@@ -378,6 +377,10 @@ class AmazonApplicationLoadBalancerCachingAgent extends AbstractAmazonLoadBalanc
Map<String, CacheData> loadBalancers = CacheHelpers.cache()
Map<String, CacheData> targetGroups = CacheHelpers.cache()

Map<String, String> targetGroupNameToType = allTargetGroups.collectEntries {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the best name

@anotherchrisberry anotherchrisberry merged commit 917c8d2 into spinnaker:master May 8, 2018
@anotherchrisberry anotherchrisberry deleted the tgloader branch May 8, 2018 14:11
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

Successfully merging this pull request may close these issues.

3 participants