Hi,

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?
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

Reply via email to