Welcome! Log In Create A New Profile

Advanced

Nginx changing settings on the fly?

July 26, 2013 05:18PM
We're currently using CrossRoads for our load balancing needs and are evaluating a switch to Nginx. We are excited by the existence of a pacemaker/heartbeat ocf script. But one of the needs that we have is that our web servers have somewhat volatile load averages. Some hits cause a tremendous amount of processing, most others cause very little.

The nginx config option "weight" allows you to balance how much load to preferentially give to which host, but can this option be changed in value without restarting nginx? I would want to default to "1" and then have each logic server announce to the load balancer what weight should be used, in short intervals.

Crossroads has a web-based admin interface that we use to set an equivalent value in crossroads so that busy servers are effectively "routed around" until their load drops to a more normal value.

In Crossroads' case it would look something like:

#! /bin/sh
loadbalancer="crossroads.mycompany.com"
servername="alphabits"
weight="4.5"
wget http://$loadbalancer/$servername/load/$weight

Does nginx have a feature like this?
SubjectAuthorPosted

Nginx changing settings on the fly?

YesThatGuyJuly 26, 2013 05:18PM

Re: Nginx changing settings on the fly?

B.R.July 26, 2013 05:56PM

Re: Nginx changing settings on the fly?

YesThatGuyJuly 26, 2013 06:33PM

Re: Nginx changing settings on the fly?

B.R.July 26, 2013 06:52PM

Re: Nginx changing settings on the fly?

YesThatGuyJuly 26, 2013 08:26PM

Re: Nginx changing settings on the fly?

Jonathan MatthewsJuly 27, 2013 04:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 83
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready