HAProxy Enterprise Documentation 2.1r1
Discovery with A Records
DNS A records map hostnames to IP addresses. You can configure HAProxy Enterprise to query for these records and populate server
lines from the information that returns.
Inspect servers with the Runtime API
Run the command show servers state [backend name]
to see the servers loaded into memory:
$ echo "show servers state webservers" | sudo socat stdio /var/run/hapee-2.1/hapee-lb.sock
# be_id be_name srv_id srv_name srv_addr srv_fqdn srv_port srvrecord
3 servers 1 web1 192.168.50.33 myservice.example.local 80 -
3 servers 2 web2 192.168.50.31 myservice.example.local 80 -
3 servers 3 web3 192.168.50.32 myservice.example.local 80 -
3 servers 4 web4 - myservice.example.local 80 -
3 servers 5 web5 - myservice.example.local 80 -
This example shows five servers: web1, web2, web3, web4 and web5.
The DNS records returned IP addresses for only three servers.
When there are more servers generated from the template than there are DNS records, the extra servers do not get an assigned IP address; they show a dash where an IP address would normally go.
The extra server lines start in maintenance mode and will pick up IP addresses as more DNS records return.
Next up
Real Time Dashboard