Gracefully Scaling to 10k PostgreSQL Connections for $35/mo, Part One

Fri Jul 20 2018

Most PostgreSQL queries and sessions in a well-designed application are short-lived, on the order of a couple of milliseconds, and return very small result sets. Most web apps don’t take advantage of the stateful features of PostgreSQL sessions, or always use the same stateful parameters, like setting the timezone. As a result, this model means a PostgreSQL connection pooler can open a few connections to the upstream database and multiplex those client queries together. This approach easily scales to tens of thousands of concurrent web processes and hundreds of thousands of incoming client connections while taking up a minimal footprint.

Full Stack Weekly Newsletter

A free weekly newsletter for full stack web developers!