I'm glad to hear that Django managed to get persistent db connections after years of "just use PgPool/PgBouncer". Keep up the good work!
I'm glad to hear that Django managed to get persistent db connections after years of "just use PgPool/PgBouncer". Keep up the good work!
Reaching 10 000 connections wasn't difficult in this case; it was just a matter of tuning a few system parameters. Exploring the APIs and studying how they can fit together was much more interesting, and sometimes challenging.
(After all it will still open and close connections for Django but keeps them open for psql)
Now, for serving 10k connections with template libraries and middlewares and ORM, out of the box? Serving dynamic content for each connection? Impossible =)
Not without some kind of caching (but you can do that with the help of a middleware)
[1] https://github.com/django/django/blob/master/django/db/__ini...
What I'm saying is that with PgBouncer you have Django <> PgBouncer <> Postgresql, right?
So what PgBouncer is doing (dealing with several open/close connections) maybe could be done better inside PostgreSQL