News for hackers. Stuff that matters.
Re:PgBouncer is useful, important, and fraught with peril by dkhenry on Friday September 08, 2023 @10:15AM (#37433793)
The constraint is less often the database in reality then in theory. Expecially when you consider many large scale applications are doing complex things. A normal request trace might only spend 30% or 40% of its time in the DB call. When you consider that a single postgres database can clear 200k QPS, you start to get to a world where you have thousands of hosts. If you tried to tune the in application connection pool to suit the various scale of deployments you would quickly find that having a proxy is both simpler and safer.

I would confidently state that most large scale applications have run into the situation where they have scale up their application worker fleet, and then crashed their database with too many connections. Coordinating the size of the worker connection pool in a world where we have elastic application workers is enough of a task that deploying a proxy is really the simplest and best solution

Re:PgBouncer is useful, important, and fraught with peril by Deadron on Friday September 08, 2023 @10:51AM (#37434242)
Most large scale web applications spend their time reading and writing data, both to/from clients and to/from other remote services such as databases. You don't need thousands of hosts. Stackoverflow famously ran 9 server instances in 2016 with 7 dedicated to the primary sites.

Unlike postgres, Oracle and Sql server can support thousands of connections but they see performance degradation at a certain point. So I have never seen them crash from too many connections(Although they definitely get slower.).

Re:PgBouncer is useful, important, and fraught with peril by dkhenry on Friday September 08, 2023 @12:08PM (#37435485)
Stackoverflow is very much the exception not the rule. Most of your top tier software companies have server fleets that scale well past the 10,000's of nodes level, and for container based workloads I don't think its uncommon to have even medium sized companies running 100k+ containers.
Re:PgBouncer is useful, important, and fraught with peril by raspasov on Friday September 08, 2023 @03:39PM (#37438420)
Tldr; aim to be the exception!