Slow Client connection blocks Mongrel

Posted by Sanjay on Stack Overflow See other posts from Stack Overflow or by Sanjay
Published on 2009-05-11T20:36:12Z Indexed on 2010/06/14 10:42 UTC
Read the original article Hit count: 196

Filed under:
|
|

I have a Apache + Haproxy + Mongrel setup for my rails application. When I hit a particular server page, mongrel takes around 100ms to process the request and I get the page in around 5 secs due to data transmission time on my slow home connection.

Now I see that during these 5 secs of data transmission, mongrel does not serve any other request. I am surprised as that means mongrel is serving the response html to the client and is blocked till the client receives it. Shouldn't serving response be the job of Apache?

This puts serious bottleneck in the no of requests Mongrel can serve as that would depend on the speed of the client connection. Is there any way that html generated by mongrel is served by apache/haproxy or any other web server like nginx?
I wonder how the other high traffic sites are managing it?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about apache