Supavisor: Scaling Postgres to 1 Million Connections
One of the most widely-discussed shortcomings of Postgres is its connection system. Every Postgres connection has a reasonably high memory footprint, and determining the maximum number of connections your database can handle is a bit of an art.
A common solution is connection pooling. Supabase currently offers pgbouncer which is single-threaded, making it difficult to scale. We've seen some novel ways to scale pgbouncer, but we have a few other goals in mind for our platform.
And so we've built Supavisor, a Postgres connection pooler that can handle millions of connections.