On Jan 23, 2012, at 9:06 PM, zuhaib siddique wrote:
So for a while now we have been using Amazon ELB as our LB for our server and we have an internal cookbook that adds new nodes to a particular ELB using fog. Well now it seems due to some requirement changes we might need to move away from ELB to nginx. Now one of the things that is bugging me is a dynaimc way of adding new nodes to nginx. I have in the past setup simple round robin load balancers with nginx but we would like an way to make sure everytime we deploy a server its automatically added to the nginx LB and before I go out and reinvent the wheel I am wondering if anyone else has done this or at lest has something that can point me in the right directions so I can write my own.
We built a simple search-based method for use with haproxy. Every time that chef-client executes on the proxy server(s), it does a search of all nodes that have a certain role (e.g., “role[web]”), and all the nodes that come back as matching that search get put into the set of machines to be load balanced.
We’re now switching away from haproxy, and we’ve looked at both nginx and lighttpd for this function. Both look useful, but since we’re also switching away from apache/httpd to lighttpd for web serving, we’re going to try going with lighttpd as the reverse proxy as well. That way we can kill two birds with one stone, and remove one package from our list of dependencies that we may not really need.
But we’ll still use the search-based method of updating our load-balancing rules, at least until we find a better solution.
Brad Knowles email@example.com
SAGE Level IV, Chef Level 0.0.1