Using nginx as a load balancer
mickeyben.com
mickeyben.com
I've personally encountered some pretty serious issues when a back-end server isn't responding (nginx hanging); the _balancing_ aspect is non-existent, though there's a third party nginx module for it (upstream_fair); but it generally doesn't seem like there's motivation to encourage/support using nginx as a load balancer.
It's a pity, because nginx does SSL much better than haproxy does. We're still using nginx but we monitor it _very_ closely.
"We still do not have any ETA on when that will be available. That being said I do not think we will have this ready anytime in the next couple of months."
I'm generally happy with EY Cloud, but it's still got some rough edges like this that should have been ironed out before they went out of beta.
http://affectioncode.wordpress.com/2008/06/28/another-compar...
http://brainspl.at/articles/2007/11/09/a-fair-proxy-balancer...
I'll have to make a try
It's certainly not a full-featured load balancer -- nothing like the visibility and control you get with haproxy or similar -- but for us it's never been a problem. Our backends handle up to 100 concurrent requests and we use straight round-robin across a large pool. In ~2 years, nginx has never hung, mis-balanced requests, or skipped a beat. One node failed once because of human error during a binary upgrade, and I was pissed -- I thought I could keep the thing running forever.
Many of the horror stories I used to see on the nginx lists were in cases where each backend could only handle one request at a time, which I think was the genesis of upstream_fair. I suspect this is a big reason for the bad load balancing reputation.
What's missing is easily taking servers out of rotation and non-trivial health checks. Both can be done with config file changes, and nginx's graceful restart mechanism is very robust. But there's no side-channel for changing upstreams on the fly.
nginx + haproxy is a fine choice if you need more control, and I've seen haproxy on both sides. Haven't used SSL support in haproxy, but it's good in nginx.
Side-channel for changing upstreams on the fly (with no entires in nginx configuration) is on the roadmap for ngx_supervisord-2.0, but sadly I don't see this happening in the foreseeable future...
Also, could you explain what do you mean by non-trivial health checks?
You can mail me off-site with the way to reproduce this (check my profile for e-mail address).