- Creates a new peer list with name <peersect>. It is an independent section,
- which is referenced by one or more stick-tables.
[
]:
- Disables a peers section. It disables both listening and any synchronization
- related to this section. This is provided to disable synchronization of stick
- tables without having to comment out all "peers" references.
[param*]
- Change default options for a server in a "peers" section.
Arguments:
See also: “
- This keyword is available in sections :
- Peers
- This re-enables a disabled peers section which was previously disabled.
server
- As previously mentioned, "" keyword may be replaced by "server
" keyword
- This keyword is available in sections :
- Alphabetically sorted keywords reference
- with a support for all "
" parameters found in 5.2 paragraph.
- This keyword is available in sections :
- Peers
- If the underlying peer is local, <ip>:<port> parameters must not be present.
- These parameters must be provided on a "bind
" line (see "
- This keyword is available in sections :
- Alphabetically sorted keywords reference
" keyword
- This keyword is available in sections :
- Alphabetically sorted keywords reference
- of this "" section).
- Some of these parameters are irrelevant for "peers" sections.
peers mypeers
peer haproxy1 192.168.0.1:1024
peer haproxy2 192.168.0.2:1024
peer haproxy3 10.2.0.1:1024
backend mybackend
balance roundrobin
stick-table type ip size 20k peers mypeers
stick on src
server srv1 192.168.0.30:80
server srv2 192.168.0.31:80
Example:
peers mypeers
bind 127.0.0.11:10001 ssl crt mycerts/pem
default-server ssl verify none
server hostA 127.0.0.10:10000
server hostB #local peer
- Configure a stickiness table for the current section. This line is parsed
- exactly the same way as the "stick-table" keyword in others section, except
- for the "" argument which is not required here and with an additional
- mandatory first parameter to designate the stick-table. Contrary to others
- sections, there may be several "table" lines in "" sections (see also
- "stick-table" keyword).
- Also be aware of the fact that "" sections have their own stick-table
- namespaces to avoid collisions between stick-table names identical in
- sections names to the name of the stick-tables followed by a '/' character.
- If somewhere else in the configuration file you have to refer to such
- stick-tables declared in "peers" sections you must use the prefixed version
- of the stick-table name as follows:
- peers mypeers
- peer A ...
- peer B ...
- table t1 ...
- frontend fe1
- tcp-request content track-sc0 src table mypeers/t1
- This is also this prefixed version of the stick-table names which must be
- used to refer to stick-tables through the CLI.
- About "" protocol, as only "peers" belonging to the same section may
- communicate with each others, there is no need to do such a distinction.
- Several "" sections may declare stick-tables with the same name.
- This is shorter version of the stick-table name which is sent over the network.
- There is only a '/' character as prefix to avoid stick-table name collisions between
- stick-tables declared as backends and stick-table declared in "peers" sections
- as follows in this weird but supported configuration:
- peers mypeers
- peer A ...
- peer B ...
- table t1 type string size 10m store gpc0
- backend t1
- stick-table type string size 10m store gpc0 peers mypeers
- Here "t1" table declared in "mypeeers" section has "mypeers/t1" as global name.
- level the former table is named "/t1", the latter is again named "t1".