3 ms·
Before Unicorn, traditional setups with Nginx + mongrel_cluster, Nginx + Thin, Apache + mongrel_cluster, Apache + Thin, do exactly the same thing. Actually, th
by tomfakes 16y ago
Before Unicorn, traditional setups with Nginx + mongrel_cluster, Nginx + Thin, Apache + mongrel_cluster, Apache + Thin, do exactly the same thing.
Actually, this isn't entirely correct. Traditional setups with nginx have needed HAProxy in the middle to perform the same balancing that Unicorn provides.
I've deployed Nginx + Mongrel, Nginx + HAProxy + Mongrel, Nginx + HAProxy + Thin and finally Nginx + Unicorn.
For any non-trivial app, you will need some form of balancing of requests to avoid the 'single request hurts everyone' problem. Unicorn does this in the cleanest way, as the number of places to define the process count is in a single location with Unicorn, and in at least 2 places with HAProxy + <Thin or Mongrel>.
We tried testing Phusion Passenger 2.x for our workload, and found that it often ran more processes than we configured it for, and could take out the entire server by over committing memory. This then needed yet more config in out monitoring solution and became more trouble than it was worth.
For ease of configuration and actually working as advertised, I would recommend Unicorn to anyone running a Ruby web server.