There are 4 elastic search nodes in a cluster and these 4 nodes are setup behind haproxy. Each of the node in the cluster is receiving around 900 to 1000 tcp connections, but one of the node has very less around 400 connections. Following is the configuration of ES node in the haproxy.cfg file
listen es-cluster
bind *:9200
mode tcp
option tcpka
option tcplog
balance leastconn
#balance roundrobin
timeout client 30m
timeout server 30m
server host1 xxx.xxx.xxx.xxx:9200 check weight 100
server host2 aaa.aaa.aaa.aaa:9200 check weight 65
server host3 bbb.bbb.bbb.bbb:9200 check weight 150
server host4 ccc.ccc.ccc.ccc:9200 check weight 100
server host5 ddd.ddd.ddd.ddd:9200 check weight 100
host3
has got very few tcp connections. I was using roundrobin
in the begining. Due to more number of connections on one of the node, I changed the configuration to leastconn
with weights and increased the weight for node host3
. Still the number of TCP connection on node `host3' is very less. What further changes can be made in order for all the nodes to have equal number of connections