I’m thinking of switching to using RubyWorks rather than keep rolling/
maintaining my own stack. Until now, I’ve used Apache2 Proxy balancer
for my mongrel cluster. I see that RubyWorks ships HAProxy instead.
Anyone care to tell me of the pros/cons using HAProxy?
My hunch is that HAProxy vs. Apache2 Proxy is same-same.
I’m thinking of switching to using RubyWorks rather than keep rolling/
maintaining my own stack. Until now, I’ve used Apache2 Proxy balancer
for my mongrel cluster. I see that RubyWorks ships HAProxy instead.
Anyone care to tell me of the pros/cons using HAProxy?
Cons: yet another process to manage.
Pros: HAProxy (as configured in RubyWorks stack) sends only one
request at a time to any Mongrel in the cluster, thus preventing
requests from piling up on a Mongrel that is stuck for a long time
inside Rails handler. As a side-effect, this also prevents Mongrels
from allocating extra 50 Mb of RAM per process under load, which is
important when you are running multiple relatively inactive apps on
the same hardware.
How do you set up the system to handle static files using HAProxy?
mod_rewrite in apache or similar to front it, as you would with a
mongrel_cluster?
Yes. The only difference is that you use normal mod_proxy and let
HAProxy do the load balancing.
Does HAProxy support X-SendFile hearder?
We haven’t specifically tested the functionality you are thinking
about (serving large files) with this stack, but HAProxy simply passes
HTTP headers back to the web server.