Set up RDS-Proxy connection pooler for Gitlab DB #1004
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.
Sets up the Amazon RDS Proxy service for our gitlab RDS postgres instance. RDS Proxy is essentially an AWS-managed DB connection pooler, similar to PgBouncer. Using this will help avoid the issue we've seen lately where the webservice and/or sidekiq pods rapidly scale up and down due to load, resulting in oversaturation of DB connections and essentially DoS'ing the RDS instance.
See https://aws.amazon.com/rds/proxy/pricing/ for pricing details. For our
db.t3.xlarge
RDS instance with 4 vCPUs, using RDS Proxy would cost approximately $43.20 a month.0.015 (cost per hour) * 4 (vCPU count) * 24 (hours) * 30 (days) = 43.20
I've already deployed this to staging, and it works.
References used -
db_proxy
Terraform provider docs