Only applicable when integrating with multiple servers of КАТА 5.0 or a later version.
To create a configuration file for the built-in balancer:
global
log 127.0.0.1 local6
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
stats socket /var/lib/haproxy/stats user root group adm mode 660 level user
maxconn 1000
user haproxy
group haproxy
daemon
defaults
mode tcp
log global
retries 3
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout check 10s
maxconn 1000
frontend kata_balancer
bind 127.0.0.1:8000
default_backend kata_servers
backend kata_servers
balance roundrobin
default-server check
server kata_node1 <IP-address1:port1>
server kata_node2 <IP-address2:port2>
server kata_node3 <IP-address3:port3>
server kata_node4 <IP-address4:port4>
resolvers dns_servers
parse-resolv-conf
accepted_payload_size 8192
timeout resolve 10s
timeout retry 10s
hold valid 60s
backend kata_servers
balance roundrobin
default-server check resolvers dns_servers init-addr none
server-template kata_node 8 <domain_name>:<port>
To obtain the list of addresses using a domain name, on the DNS server, create a domain name (for example, kata.example.com) with multiple A records indicating the IP addresses of KATA servers.
The configuration file for the built-in balancer is created.
Page top