PgBouncer

Optional. Session pool for api/worker. dhcpd keeps a direct DSN because of LISTEN/NOTIFY.

Most estates never need this. Scale dhcpd processes first. Postgres.

If you do put a pool in front:

  • Session pooling if you pool dhcpd at all.
  • Transaction pooling is fine for api/worker only. dhcpd keeps a direct DSN — the config cache uses LISTEN lattice_config, which transaction pooling cannot carry.
  • Cap default_pool_size against max_connections.
  • Do not put a pool in front of Patroni’s REST API or WAL.