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

feat: introduce pgbouncer as a PostgreSQL proxy #16

Merged
merged 2 commits into from
Jul 3, 2024

Conversation

skatsaounis
Copy link
Collaborator

@skatsaounis skatsaounis commented Jun 12, 2024

This PR adds pgbouncer charm as a subordinate charm of maas-region. Instead of directly communicating with PostgreSQL, MAAS region will use pgbouncer as a proxy. The number of max connections to pgbouncer is configured as relevant to the number of MAAS region nodes of Anvil cluster.

This PR is an enabler for fixing: #11, if not a complete fix at all. In case the default sane values that this PR uses are not enough to fix the starvation issue, the way pgbouncer is introduced, provides a way to override their values. Those overridden values can be passed to pgbouncer through the manifest mechanism of maas-anvil.

@skatsaounis
Copy link
Collaborator Author

Blocked by: canonical/pgbouncer-operator#245

@skatsaounis skatsaounis marked this pull request as ready for review June 27, 2024 17:41
anvil-python/anvil/versions.py Outdated Show resolved Hide resolved
cloud/etc/deploy-postgresql/variables.tf Outdated Show resolved Hide resolved
@delgod
Copy link
Member

delgod commented Jul 2, 2024

Blocked by: canonical/pgbouncer-operator#245

I think it is unblocked now

@skatsaounis
Copy link
Collaborator Author

Hi @delgod . Thank you for the hints. The PR has been updated to be able to set them and we will try to merge it soon.

@skatsaounis skatsaounis merged commit 785405c into canonical:main Jul 3, 2024
4 checks passed
@skatsaounis skatsaounis deleted the add-pgbouncer branch July 3, 2024 07:13
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.

3 participants