Skip to content

PGBouncer

PGBouncer is a stateless service that acts as a connection pooler for Postgres, with some load balancing built in.

We operate multiple PGBouncer fleets, that handle different portions of the site traffic. As of writing (08/2024), the following fleets exist in production:

  • ci
  • registry
  • sidekiq-ci
  • sidekiq
  • main

Clients connect through a GCP network loadbalancer, and connections are sent to active backend nodes. As such we should be able to remove instances from the pool and perform upgrades without significant disruption, or scheduling lead time.

Knife query:

knife search node 'roles:gprd-base-db-pgbouncer*' -i | sort

See Linux Patching Overview for generic processes applied to all Linux systems.

Upgrades will be performed on individual instances or groups of instances at a time, across the multiple pgbouncer fleets that we run:

  • Remove the node from the GCP loadbalancer
  • Update packages
  • Reboot
  • Add the node(s) back to the loadbalancer
  • repeat.

None currently exists.