Ezra Zygmuntowicz, a Ruby developer and Engine Yard co-founder, writes about Merb, Nginx, Mongrel, Vertebra, and cloud automation.
HN links it for his early Nginx and Mongrel posts, with one commenter crediting him for Nginx's spread in the West, plus his Vertebra and Engine Yard posts.
I'm a huge fan of both Nginx and HAProxy - used together.
[internet] <-> [Nginx] <-> [HAProxy] <-> [app servers]
Nginx is a great webserver, but isn't a good load balancer. You can install a patch that improves the balancer - http://brainspl.at/articles/2007/11/09/a-fair-proxy-balancer-for-nginx-and-mongrel - but it still isn't as nice as HAProxy
With HAProxy the status of the system is visible. For the largest site I use HAProxy on I keep my status page public - http://userscripts.org/haproxy - but it isn't required.
HAProxy is particularly good for rails since you can say each app server can only have 1 request at any time. This makes requests queue at the HAProxy layer, so if an app server has a request that takes a extra long time you don't have requests waiting for that app server to finish - instead you wait for the next available app server in a FIFO queue.
Combining HAProxy with munin gives great stats for tuning your system - whereas just nginx with the patch had no visibility into where bottlenecks might be.
I
Here are some numbers from our application, let me know if this helps:
We have 400K daily active users, doing 200 requests a second and around 10MM page views per day. All requests are dynamic and hit the full Rails stack. We're probably easily in the top 5 Rails sites on the net based on load.
We run all of this on 5x 4core 8GB application servers and 2x 4core 32GB db servers in master-master replication. We run 16 mongrels on each app server for a total of 80. Our average response time per request is around 100-200ms.
We host on Softlayer and pay around $6000 a month.
Also, the number of mongrels you will need is directly dependent on how fast your requests are, and how you are loading balancing across these mongrels. We use the nginx proxy with the fair load balancing patch.
http://brainspl.at/articles/2007/11/09/a-fair-proxy-balancer-for-nginx-and-mongrel
More links:
http://weblog.rubyonrails.org/2008/12/23/merb-gets-merged-into-rails-3
http://yehudakatz.com/2008/12/23/rails-and-merb-merge/
http://rubyonrails.org/merb
http://merbist.com/2008/12/23/rails-and-merb-merge/
http://brainspl.at/articles/2008/12/23/merb-is-rails
http://loriholden.com/archives/2008/12/23/16-merb-is-rails-30
http://mornini.wordpress.com/2008/12/23/rails-2x-merb-1x-rails-30/
http://splendificent.com/2008/12/the-merb-rails-merger-announcement-an-inside-opinion/
I agree and I'm working with marketing folks to make this stuff more clear. There are just so many details to get a release like this out the door that some things didn't get as much attention as they deserved. But your point is well taken and I'll try to get the message cleared up as it is pretty cool IMHO.
Also look for some more technical deep dive blog posts on my blog by tomorrow at http://brainspl.at where I will clarify a bunch of this stuff.(right after I get some sleep;)
Thanks for this comment, I didn't know about it.
After your comment I google for more infos and find that :
http://affectioncode.wordpress.com/2008/06/28/another-comparison-of-haproxy-and-nginx/
http://brainspl.at/articles/2007/11/09/a-fair-proxy-balancer-for-nginx-and-mongrel
I'll have to make a try
I first heard of Nginx from a blog post[1] by Ezra Zygmuntowicz almost 5 years ago. I suspect Ezra was the primary contributor to the success of Nginx in the western world.
[1]: http://brainspl.at/articles/2006/08/23/nginx-my-new-favorite-front-end-for-mongrel-cluster