-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
## Summary Fixes #2600 ### Time to review: __5 mins__ ## Changes proposed - Adds scaling docs. Half in `OPERATIONS.md` and half inside the terraform files - [ API, frontend ] x [ dev, staging, prod ] up to calculated values - Adds memory scaling in addition to the existing CPU scaling - Makes scale out more aggressive (300 seconds => 60 seconds) ## Context for reviewers This should be enough for a week or two. I'll re-evaluate prod weekly as we send out emails advertising the new system.
- Loading branch information
1 parent
3a1903a
commit 306d118
Showing
15 changed files
with
248 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Maintenances and Operation of Runtime System | ||
|
||
## Scaling | ||
|
||
All scaling options can be found in the following files: | ||
|
||
API: | ||
|
||
- [infra/api/app-config/dev.tf](infra/api/app-config/dev.tf) | ||
- [infra/api/app-config/staging.tf](infra/api/app-config/staging.tf) | ||
- [infra/api/app-config/prod.tf](infra/api/app-config/prod.tf) | ||
|
||
Frontend: | ||
|
||
- [infra/frontend/app-config/dev.tf](infra/frontend/app-config/dev.tf) | ||
- [infra/frontend/app-config/staging.tf](infra/frontend/app-config/staging.tf) | ||
- [infra/frontend/app-config/prod.tf](infra/frontend/app-config/prod.tf) | ||
|
||
### ECS | ||
|
||
Scaling is handled by configuring the following values: | ||
|
||
- instance desired instance count | ||
- instance scaling minimum capacity | ||
- instance scaling maximum capacity | ||
|
||
Our ECS instances auto scale based on both memory and CPU. You can view the autoscaling configuration | ||
here: [infra/modules/service/autoscaling.tf](infra/modules/service/autoscaling.tf) | ||
|
||
### Database | ||
|
||
Scaling is handled by configuring the following values: | ||
|
||
- Database minimum capacity | ||
- Database maximum capacity | ||
- Database instance count | ||
|
||
In prod, the database maximum capacity is as high as it goes. Further scaling past the point will require scaling | ||
out the instance count. Effectively using the instance count scaling might require changes to our application layer. | ||
|
||
### OpenSearch | ||
|
||
- Search master instance type | ||
- Search data instance type | ||
- Search data volume size | ||
- Search data instance count | ||
- Search availability zone count | ||
|
||
When scaling openSearch, consider which attribute changes will trigger blue/green deploys, versus which attributes | ||
can be edited in place. [You can find that information here](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/managedomains-configuration-changes.html). Requiring blue/green changes for the average configuration change is a | ||
notable constraint of OpenSearch, relative to ECS and the Database. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.