canonical / maas-anvil

A snap for managing charmed MAAS deployments.
https://maas.io
Apache License 2.0
3 stars 6 forks source link

feat: introduce pgbouncer as a PostgreSQL proxy #16

Closed skatsaounis closed 3 months ago

skatsaounis commented 3 months ago

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 commented 3 months ago

Blocked by: https://github.com/canonical/pgbouncer-operator/issues/245

delgod commented 3 months ago

Blocked by: canonical/pgbouncer-operator#245

I think it is unblocked now

skatsaounis commented 3 months ago

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.