I had a scalability problem on a Django website, basically with 4000 online users the website was not accessible, I run some load test:
ab -n 1000 -c 100 http://www.domain.com/
The performance was very poor, 30 to 45 requests/second. Profiling the app didn't gave me any details on why the app is slow https://code.djangoproject.com/wiki/ProfilingDjango.
But once I changed my Nginx configuration from TCP to Unix socket it went from 30r/s to 2500r/s based on those discussion unix-socket-vs-tcp-ip-hostport or whats-the-difference-between-unix-socket-and-tcp-ip-socket the Unix sockets aren't as fast as my load test result.
I'm using Ubuntu 12.04 server with Nginx 1.2.3 Gunicorn 0.14.6, I also replicated the same behavior on my local machine. How can I explain this ???