I have two HAProxy in different regions. Each haproxy have some instances for balancing.
Is it possible to use each of these proxies as a backup for another?
I found this article with examples:
https://www.haproxy.com/blog/failover-and-worst-case-management-with-haproxy/
I tried to use something like this:
...
backend bk_app_backup
server second_haproxy.com x.x.x.x:443 check backup
But I got 502 Bad Gateway
when I try to open https://x.x.x.x
Or, I can not use haproxy as a backup and should add all instances from backend
of first haproxy config to second in backup
section?
Something like this:
#first haproxy
...
backend http_back
balance roundrobin
server instance_a_01 x.x.x.x:443 check
server instance_a_01 x.x.x.x:443 check
#second haproxy
...
backend http_back
balance roundrobin
server instance_b_01 x.x.x.x:443 check
server instance_b_02 x.x.x.x:443 check
...
backend bk_app_backup
server instance_a_01 x.x.x.x:443 check backup
server instance_a_02 x.x.x.x:443 check backup