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

[IBCDPE-1004] Create connection pooler #27

Merged
merged 14 commits into from
Aug 20, 2024
Merged

Conversation

BryanFauble
Copy link
Contributor

Problem:

  1. Looking at database stats Apache airflow was taking all 100 connections and not giving them up:
    image

From docs I read this is a known item and their own recommendation is to use pgbouncer as a connection pooler.

Solution:

  1. The cloud native PG instance has an easy way to implement a connection pooler. Turning it on and pointing the connection secret to the connection pooler.

Testing:

  1. Will deploy and test on the sandbox cluster.

@spacelift-int-sagebionetworks spacelift-int-sagebionetworks bot temporarily deployed to spacelift/dpe-dev-kubernetes-deployments August 20, 2024 21:27 Inactive
@spacelift-int-sagebionetworks spacelift-int-sagebionetworks bot temporarily deployed to spacelift/dpe-dev-kubernetes-deployments August 20, 2024 22:04 Inactive
@BryanFauble BryanFauble marked this pull request as ready for review August 20, 2024 22:21
@BryanFauble BryanFauble requested a review from a team as a code owner August 20, 2024 22:21
"user" = "application-database"
"username" = "application-database"
"connection" = "postgresql://application-database:${random_password.pg-password.result}@${var.argo_deployment_name}-cluster-rw.${var.namespace}:5432/application-database"
"connection" = "postgresql://application-database:${random_password.pg-password.result}@${var.argo_deployment_name}-pooler-rw.${var.namespace}:5432/application-database"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

A future enhancement would be to allow the person using this module to create a connection pooler or not. Likely they would have a sensible application that doesn't take every connection to the DB possible.

@BryanFauble BryanFauble merged commit 94e0dd4 into main Aug 20, 2024
4 of 6 checks passed
@BryanFauble BryanFauble deleted the ibcdpe-1004-add-pooler branch August 20, 2024 22:42
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