History

Document the 20-connection application pool

Rhys Sullivan committed 1 month ago

Commit d8a64df1 parent 24adb121 file · +6 −3Browse files

Unified · Split

apps/cloud/docs/database-connections.md+6−3
@@ -11,16 +11,19 @@ The connection budget is: · 10 unmodified lines
11| PostgreSQL max_connections | 50 |11| PostgreSQL max_connections | 50 |
12| PostgreSQL superuser_reserved_connections | 3 |12| PostgreSQL superuser_reserved_connections | 3 |
13| Local PgBouncer processes | 1 |13| Local PgBouncer processes | 1 |
14| PgBouncer default_pool_size | 12 |14| PgBouncer default_pool_size | 20 |
15| PgBouncer max_db_connections | 12 |15| PgBouncer max_db_connections | 20 |
16| PgBouncer max_client_conn | 400 |16| PgBouncer max_client_conn | 400 |
17| PgBouncer max_prepared_statements | 200 |17| PgBouncer max_prepared_statements | 200 |
18| Hyperdrive origin connection limit | 12 (soft limit) |18| Hyperdrive origin connection limit | 20 (soft limit) |
19 19
20Hyperdrive's origin limit is advisory. PgBouncer's database limit enforces the20Hyperdrive's origin limit is advisory. PgBouncer's database limit enforces the
21backend budget across users of one database. The cap is per PgBouncer process:21backend budget across users of one database. The cap is per PgBouncer process:
22adding processes, databases, direct clients, or other poolers requires a new22adding processes, databases, direct clients, or other poolers requires a new
23aggregate budget. Keep capacity for provider sessions, deploys and administration.23aggregate budget. Keep capacity for provider sessions, deploys and administration.
24The 20-connection application budget leaves 27 ordinary slots for those clients
25after the three superuser-reserved slots. This is a concurrency ceiling, not a
26target for active queries; check CPU, queue waits and latency before raising it.
24Prepared statements require protocol-level support to remain enabled in PgBouncer.27Prepared statements require protocol-level support to remain enabled in PgBouncer.
25 28
26The migration and membership-readiness scripts retry only the initial `SELECT 1`29The migration and membership-readiness scripts retry only the initial `SELECT 1`