]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: checks: Add agent health check
authorSimon Horman <horms@verge.net.au>
Tue, 12 Feb 2013 01:45:54 +0000 (10:45 +0900)
committerWilly Tarreau <w@1wt.eu>
Wed, 13 Feb 2013 10:03:28 +0000 (11:03 +0100)
commita2b9dadedde8bffdc5744d771b765bc7647569c7
tree82b7da1437a427a6ad43e2f49205f87e890e5066
parentb796afa60dc44e96beeec508e6180f3ed1708b72
MEDIUM: checks: Add agent health check

Support a agent health check performed by opening a TCP socket to a
pre-defined port and reading an ASCII string. The string should have one of
the following forms:

* An ASCII representation of an positive integer percentage.
  e.g. "75%"

  Values in this format will set the weight proportional to the initial
  weight of a server as configured when haproxy starts.

* The string "drain".

  This will cause the weight of a server to be set to 0, and thus it will
  not accept any new connections other than those that are accepted via
  persistence.

* The string "down", optionally followed by a description string.

  Mark the server as down and log the description string as the reason.

* The string "stopped", optionally followed by a description string.

  This currently has the same behaviour as down (iii).

* The string "fail", optionally followed by a description string.

  This currently has the same behaviour as down (iii).

A agent health check may be configured using "option lb-agent-chk".
The use of an alternate check-port, used to obtain agent heath check
information described above as opposed to the port of the service,
may be useful in conjunction with this option.

e.g.

    option  lb-agent-chk
    server  http1_1 10.0.0.10:80 check port 10000 weight 100

Signed-off-by: Simon Horman <horms@verge.net.au>
doc/configuration.txt
include/types/peers.h
include/types/proxy.h
src/cfgparse.c
src/checks.c