Files
supabase/apps/studio/components/interfaces/Settings/Database/ConnectionPooling/ConnectionPooling.constants.ts
Joshen Lim a458977e2d Support for Dedicated Pooler in Connection Pooling (#33817)
* Init

* Initial set up for hooking up supavisor and pgbouncer

* Hook up pgbouncer status check after swapping pooler type

* Add check for nano compute for switching to pg bouncer

* Add check for ipv4 addon

* Remove expect error tag

* Add badge to select options for pooler types

* Remove statement mode

* Resolve undefined problem with react hook form

* Fix

* Update UI texts from PgBouncer to Dedicated Pooler

* Feex

* FEEX

* Fix

* Small update to UI

* Smol update
2025-02-28 11:14:42 +08:00

52 lines
1.0 KiB
TypeScript

// https://supabase.com/docs/guides/platform/performance#optimizing-the-number-of-connections
// https://github.com/supabase/infrastructure/blob/develop/worker/src/lib/constants.ts#L544-L596
// https://github.com/supabase/supabase-admin-api/blob/master/optimizations/pgbouncer.go
// [Joshen] This matches for both Supavisor and PgBouncer
export const POOLING_OPTIMIZATIONS = {
ci_nano: {
maxClientConn: 200,
poolSize: 15,
},
ci_micro: {
maxClientConn: 200,
poolSize: 15,
},
ci_small: {
maxClientConn: 400,
poolSize: 15,
},
ci_medium: {
maxClientConn: 600,
poolSize: 15,
},
ci_large: {
maxClientConn: 800,
poolSize: 20,
},
ci_xlarge: {
maxClientConn: 1000,
poolSize: 20,
},
ci_2xlarge: {
maxClientConn: 1500,
poolSize: 25,
},
ci_4xlarge: {
maxClientConn: 3000,
poolSize: 32,
},
ci_8xlarge: {
maxClientConn: 6000,
poolSize: 64,
},
ci_12xlarge: {
maxClientConn: 9000,
poolSize: 96,
},
ci_16xlarge: {
maxClientConn: 12000,
poolSize: 128,
},
}