News for hackers. Stuff that matters.
Re:10 000 concurrent real-time connections to Django by stefantalpalaru on Tuesday March 26, 2013 @07:38PM (#5446756)
Static files are no longer a problem thanks to Varnish or nginx. And this is Django, after all, so please focus on dynamic content performance.

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!

Re:10 000 concurrent real-time connections to Django by mYk on Tuesday March 26, 2013 @07:45PM (#5446785)
Yes, I'm just referring to C10k because this demo uses a technique originally created to solve C10k.

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.

Re:10 000 concurrent real-time connections to Django by calvinx on Wednesday March 27, 2013 @01:46AM (#5447999)
Awesome stuff!
Re:10 000 concurrent real-time connections to Django by raverbashing on Wednesday March 27, 2013 @06:49AM (#5448658)
Well, about PgBouncer, I believe this tells more of PostgreSQL than of Django + psql libraries

(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)

Re:10 000 concurrent real-time connections to Django by stefantalpalaru on Wednesday March 27, 2013 @07:46AM (#5448798)
It's not PostgreSQL's fault that Django closes the connection after each request explicitly (see close_connection() for what was done before 1.6):

[1] https://github.com/django/django/blob/master/django/db/__ini...

Re:10 000 concurrent real-time connections to Django by raverbashing on Wednesday March 27, 2013 @09:57AM (#5449377)
I understand that, and I'm not saying that there aren't several issues in Django (but some are getting better)

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