Ok seems my trouble came from using "balance            static-rr".

Actually when using the unix socket to set a weight to 50% it tells:
"Backend is using a static LB algorithm and only accepts weights '0%' and '100%'."
So that explains my issue.

Abd the manual states "Each server is used in turns, according to their weights.", and that led me to think it should support weights.. While i should have also read the next sentence..: "changing a server's weight on the fly will have no effect" for static-rr..

Sorry for the noise.

Steve Howard schreef op 12-1-2014 2:36:
On 1/11/14, Malcolm Turnbull <malcolm@...> wrote:
Sorry only just got around to looking at this and updating my blog entry:

Yes the important bit missing was "agent-check"....

But my testing with Dev21 seems to bring the servers back fine with
any percentage reading i.e. 10% 75% etc. Please let me know if anyone
else is having an issue, thanks.

server Win2008R2  weight 100  check agent-check
agent-port 3333 inter 2000  rise 2  fall 3 minconn 0  maxconn 0
on-marked-down shutdown-sessions
I just tested this today and can confirm that bringing a backend server back
in works for me with "100%", "99%", etc.

Also, "down" reliably takes the server out of the backend, and only a
percentage such as "50%" brings it back in.

For those struggling, I will say that the status string returned from the
socket on the backend server must have a newline terminator, or perhaps a
carriage return.  Simon's example using echo does this by default.

I was testing with a simple python socket server, and couldn't get anything
to work.  As soon as I used client.send("down" + '\n'), everything worked.
I had to add debug statements to src/checks.c to find this.

Depending on the software you use to return the status to the agent, it may
be worth checking if you are having issues.



Reply via email to