I need to setup my application is such a way that it gives me near 0 downtime. One of my data center is there in TX and another one is in Vegas. Now if my server at TX which is considered to be PR goes down all the traffic will be diverted to Vegas server which is DR (Disaster Recovery) in my case.
If we use software load balancer like HAProxy or NginX, using Keepalived (to check heartbeat between the DR site load balancer and PR site load balancer) we will end up with Active-Passive load balancing setup to overcome failover. Here our application will be in Active-Active mode.
The above diagram shows, all the incoming traffics will reach to the virtual IP of the load balancers (Active PR load balancer and Passive DR load balancer, heartbeat enabled between them). If PR site load balancer is active then it will route the load to PR site Portal application instances as well as DR site Portal instances (as both site is active), at that time DR site load balancer will be idle and constantly monitoring the performance of the Active load balancer. If PR site goes down, then the DR site will become active and point to the DR site Portal application instances automatically.
But I have heard that, the problem with Active-Passive load balancer setup with Keepalived is, it works in LAN but fails to work in WAN setup. As in our case Active PR load balancer will be in TX and Passive DR load balancer will be in Vegas.
So, to achieve HA with failover setup how can I use software load balancer?