Hi, On Mon, Jan 29, Pieter Vogelaar wrote: > I have two Elasticsearch clusters. One is the active cluster and the other is > the failover cluster. > > Is it possible to configure a failover backend if the default backend health > check failes?
Does "if the default backend health check failes" mean that all servers in default backend are down ? nbsrv + acl + use_backend (https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#7.3.1-nbsrv) frontend acl primary_down nbsrv(loggingdc1-elasticsearch-acc) lt 1 use_backend loggingdc2-elasticsearch-acc if primary_down use_backend loggingdc1-elasticsearch-acc if !primary_down (or default_backend loggingdc1-elasticsearch-acc) -Jarno > So if loggingdc1-elasticsearch-acc is not healthy, I would like to route to > the loggingdc2-elasticsearch-acc backend. > > > The configuration: > > frontend default-http > bind :80 > bind :8091 > bind :9200 > mode http > option httplog > use_backend > %[base,regsub(^www\.,,i),map_beg(/etc/haproxy/http-bases-to-backends.map,default)] > > backend loggingdc1-elasticsearch-acc > mode http > balance roundrobin > option httplog > option httpchk GET / > server loggingdc1-elasticsearch-01a:9200 10.1.20.22:9200 check > server loggingdc1-elasticsearch-03a:9200 10.1.20.23:9200 check > server loggingdc1-elasticsearch-05a:9200 10.1.20.25:9200 check > > backend loggingdc2-elasticsearch-acc > mode http > balance roundrobin > option httplog > option httpchk GET / > server loggingdc2-elasticsearch-02a:9200 10.1.36.23:9200 check > server loggingdc2-elasticsearch-04a:9200 10.1.36.25:9200 check > server loggingdc2-elasticsearch-06a:9200 10.1.36.26:9200 check > > > Best regards, > Pieter Vogelaar -- Jarno Huuskonen

