Slow connecting blocks for Mongrel clients
I have Apache + Haproxy + Mongrel setup for my rails app. When I hit a specific server page, mongrel takes about 100ms to process the request, and I get the page in about 5 seconds due to the data transfer time on my slow home connection.
Now I see that during those 5 seconds of data transfer, mongrel is not serving any other request. I'm surprised as this means that mongrel is sending an html response to the client and blocking until the client receives it. Should Apache's callback serve?
This poses a serious bottleneck in the lack of queries that Mongrel can provide, as it will depend on the speed of the client connection. Is there a way the html generated by mongrel is served by apache / haproxy or any other web server like nginx?
Wondering how other high-speed sites are running it?
a source to share
mongrel itself is multithreaded, but rails can only handle one process at a time by default, although this can be changed with config. In the case of a pooch, use the menral cluster.
FYI passenger also creates an app pool, but better deployed, better clicked and more popular right now.
a source to share