BFD-3313: Adjust autoscaling policies #2245
Merged
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.
JIRA Ticket:
BFD-3313
User Story or Bug Summary:
As a US taxpayer, I want BFD to be as efficient as possible so that I can be confident that my tax dollars are not going to waste.
What Does This PR Do?
This PR updates the BFD Server's ASG scaling policies to scale based upon average CPU utilization across the ASG. These new scaling policies are designed keeping in mind that:
ALARM
(and thus cause scaling) after scale-out begins but before the scaled-out instances contribute to the average CPU utilization metricWith the above assumptions in mind, this PR implements a bespoke CPU-based scaling solution that can be aggressive while not falling victim to the aforementioned erroneous scaling behavior.
Specifically, there are now ranges of CPU that we scale on:
0%
to50%
CPU: No scaling50%
to75%
CPU:75%
to90%
CPU:90%
CPU and above:These ranges, and corresponding scaling actions, are designed to allow the Server to respond aggressively to large incoming workloads while considering the inverse proportionality of CPU and instance count.
This PR has been verified by:
terraform apply
ing totest
, verifying that it applies properly and all policies/Alarms are createdWhat Should Reviewers Watch For?
If you're reviewing this PR, please check for these things in particular:
What Security Implications Does This PR Have?
Submitters should complete the following questionnaire:
If the answer to any of the questions below is Yes, then you must supply a link to the associated Security Impact Assessment (SIA), security checklist, or other similar document in Confluence here: N/A
If the answer to any of the questions below is Yes, then please add @StewGoin as a reviewer, and note that this PR should not be merged unless/until he also approves it.
What Needs to Be Merged and Deployed Before this PR?
This PR cannot be either merged or deployed until the following prerequisite changes have been fully deployed:
Submitter Checklist
I have gone through and verified that...:
BFD-123: Adds foo
README
updates and changelog / release notes entries.TODO
and/orFIXME
comments, which include a JIRA ticket ID for any items that require urgent attention.