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

Set up RDS-Proxy connection pooler for Gitlab DB #1004

Merged
merged 1 commit into from
Dec 13, 2024
Merged

Conversation

mvandenburgh
Copy link
Member

@mvandenburgh mvandenburgh commented Dec 5, 2024

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 -

@mvandenburgh mvandenburgh marked this pull request as ready for review December 5, 2024 04:41
Copy link
Collaborator

@jjnesbitt jjnesbitt left a comment

Choose a reason for hiding this comment

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

Nothing really stands out to me, but I guess I'm just curious about the nature of your testing in staging. Did you just test that the connection can be established through the proxy? Or was there any more testing regarding how it handles load / connection pooling?

@mvandenburgh
Copy link
Member Author

Did you just test that the connection can be established through the proxy?

Yeah, that's all I meant by tested. I haven't done any performance/load testing in staging

@mvandenburgh mvandenburgh merged commit 4137171 into main Dec 13, 2024
5 checks passed
@mvandenburgh mvandenburgh deleted the rds-proxy branch December 13, 2024 01:45
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.

2 participants