Erick Tryzelaar a4ae3d396c [load-balancer] Pass the Host and X-Forwarded-For headers from nginx to Hue 10 سال پیش
..
bin 9dd78ce950 [load-balancer] Automatically discover static file dir, avoid kt_indexer role 10 سال پیش
etc a4ae3d396c [load-balancer] Pass the Host and X-Forwarded-For headers from nginx to Hue 10 سال پیش
LICENSE.txt 95243e03c3 [tools] Add load balancer example 11 سال پیش
README.md 95243e03c3 [tools] Add load balancer example 11 سال پیش
requirements.txt 95243e03c3 [tools] Add load balancer example 11 سال پیش

README.md

This is for managing a load balancer (only nginx is supported at the moment) in front of Hue. Every 60 seconds it asks Cloudera if there has been any changes to the number of Hue servers. If so, it signals the the load balancer to add or remove those machines from the pool. To use it, you first must copy and edit

  • etc/nginx.conf.example -> etc/nginx.conf
  • etc/monitor-hue-lb.conf.example -> etc/monitor-hue-lb.conf

Then, some dependencies must be installed with:

% pip install -r requirements.txt

If you want to use virtualenv, you can do:

% virtualenv build
% export PATH=$PATH:build/`pwd`/bin/activate

Finally, to start the load balancer, run:

% ./bin/supervisord

By default the load balancer is setup on http://localhost:8000, so access that URL and see if it works for you.