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

Add connection pooling for database on preview #2342

Open
bosko-m opened this issue Nov 6, 2024 · 5 comments
Open

Add connection pooling for database on preview #2342

bosko-m opened this issue Nov 6, 2024 · 5 comments
Assignees

Comments

@bosko-m
Copy link
Contributor

bosko-m commented Nov 6, 2024

Database check (Preview / Database) is added to the health status page for GovTool on Preview.
https://status.gov.tools/status/preview-gov-tools

We need to add connection pooling in order to avoid scenario where health status page consume all db connection.

Consider using pgpool or pgbouncer.

@bosko-m
Copy link
Contributor Author

bosko-m commented Nov 6, 2024

CC @spannercode

@stepa-ict
Copy link

In this env, we have AWS RDS. It is managed through the Qovery platform, which means that we have limited possibilities to edit and customize the RDS config.
However, in AWS, connection pooling can be achieved by using Amazon RDS Proxy which is another component that stands in front of AWS RDS instances. AWS Proxy can be added directly via AWS console (our team doesn't have direct access to AWS console) but since the RDS instance is added via Qovery, this manual editing on Console can lead to configuration drift, as Qovery says on their platform.
image

@bosko-m bosko-m assigned spannercode and bosko-m and unassigned stepa-ict and djordje-git Nov 7, 2024
@spannercode
Copy link
Contributor

As I cannot contribute to the solution on this issue, I'm un-assigning myself.
So far, the preview environment seems stable on the health checks.

@spannercode spannercode removed their assignment Nov 11, 2024
@bosko-m
Copy link
Contributor Author

bosko-m commented Nov 11, 2024

@spannercode we do need to take a look at intermittent failures though

@aaboyle878
Copy link

aaboyle878 commented Nov 19, 2024

I agree with @stepa-ict we could potentially use RDS Proxy or an alternative could be to add PostgRest as was discussed a while back however this might require some effort as qovery does not natively support a connection pooling solution.

However when setting up DB-Sync I allowed 200 max connections and looking at the activity dashboard on PGAdmin it only ever seems to use a max of 9 at any given time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To do
Development

No branches or pull requests

5 participants