Skip to main content

One post tagged with "proxysql"

View All Tags

Connection Pooling on FoundryDB: PgBouncer and ProxySQL Deep Dive

· 6 min read
FoundryDB Team
Engineering @ FoundryDB

Every database connection costs memory. PostgreSQL forks a backend process per connection (roughly 5-10 MB each), and MySQL allocates per-thread buffers that scale with your buffer configuration. At 200 concurrent connections, the overhead is manageable. At 2,000, you are spending gigabytes of RAM on connection state instead of query execution.

Connection pooling sits between your application and the database, multiplexing many client connections over a small number of backend connections. FoundryDB provides PgBouncer for PostgreSQL and ProxySQL for MySQL, both managed through the API with no manual SSH or config file editing required.