add server
Add a dynamic server to a backend.
Description
Instantiate a new server attached to an existing backend. Such a server may also be called a dynamic server.
The specified server name must not already be in use in the backend. The backend must be configured to use a dynamic load-balancing algorithm for the balance
directive: roundrobin
, leastconn
, first
, or random
.
A dynamic server is not restored after a proxy reload operation. If you need the server definition to persist, add it to the HAProxy Enterprise configuration file.
Dynamic servers are statically initialized with the none init-addr
method. In this method, the server starts in the down state without a valid IP address.
It may be possible to reach the fd
(file descriptor) limit when using a large number of dynamic servers. See also fd-hard-limit
and ulimit-n
in the global keyword documentation.
The following keywords are supported for configuring the new server:
Keyword | Note |
---|---|
backup | |
disabled | |
enabled | |
id | |
maxconn | |
maxqueue | |
minconn | |
pool-low-conn | |
pool-max-conn | |
pool-purge-delay | |
proto | |
proxy-v2-options | |
send-proxy | |
send-proxy-v2 | |
source | |
tfo | |
usesrc | |
weight |
For syntax details, see Server configuration.
Servers added with this command can be deleted using the del server
command.
Examples
Below, we add the server server2 to backend be_test:
$ echo "add server be_test/server2 enabled maxconn=1000" | \
sudo socat stdio unix-connect:/var/run/hapee-2.4/hapee-lb.sock
See also
Next up
add ssl crt-list