Re:Using iptables to balance Node.js
by adamtulinius on Monday August 15, 2011 @11:24AM
(#2887261)
Or he could do it with a proper load balancing proxy such as HA Proxy. Then he would be able to take one node-instance down gracefully, update it to a newer version, and put it online again (and repeat for all other instances).
Another benefit would be more fair share of the load (not every request will take the same amount of time to complete).
Re:Using iptables to balance Node.js
by dcaylor on Monday August 15, 2011 @01:12PM
(#2887750)
I'd agree that a balancing proxy is more appropriate for HA. The post mentions that this is specifically not intended as a high availability solution. It's a fairly narrow use.
Re:Using iptables to balance Node.js
by jvoorhis on Monday August 15, 2011 @11:47AM
(#2887354)
I've used this trick to forward to a Twisted Conch daemon running as a non-root user. However, I would never consider this approach for load balancing.
I do it out of necessity, but have yet to play with the statistics portion of iptables.
Cool little article.
Secondly, you can't (in an easy way) remove or add to the pool of backends.
I'm confident others will come up with more not-so-compelling reasons for using iptables for load balancing.