Search code examples
azureload-balancingiaasinternal-load-balancer

Azure Load balancing to Multiple Sites with Disaster Recovery


I am trying to configure applications on 2 different Azure sites having their local load balancing capabilities. I can use Traffic manager to distribute the traffic and have weighted routing to force everything to my primary site.

But i want this to occur automatically where i can map a service pointing to the internal load balancers at both sites and evaluate the sites are up and running or not to decide where to forward the traffic. This will allow me not to manually configure the Traffic Manager in case of disaster.

Note : The services are hosted on IIS on IaaS VMs. ILB1 and ILB2 are respective loadbalancer for Site1 and Site2.

Any help is appreciated!

Thanks


Solution

  • As far as I know, we can't add internal load balancer as traffic manager endpoints.

    But I want this to occur automatically where I can map a service pointing to the internal load balancers at both sites and evaluate them sites are up and running or not to decide where to forward the traffic.

    By default, we can set multiple sites around the world with traffic manager, traffic manager will probe the health of all sites, forward network traffic to the right site.

    We can use traffic manager profile to manage network traffic, traffic Manager profiles use traffic-routing methods to control the distribution of traffic to your cloud services or website endpoints.

    For example, we create website 1 on site 1 (primary site), create website 2 on site 2. If we use the weighted method, network traffic will to site 1. When site 1 is down, traffic manager will know site 1 was down, will route network traffic to site 2.

    Traffic manager works as a DNS level Load Balancer, it will route network to the available site by default.

    About traffic manager probe settings, we can via the Azure portal to modify it, like this:

    enter image description here

    By the way, if you want to use traffic manager, we can add public IP address to traffic manager endpoint.


    Update:

    As a workaround, we can deploy a S2S VPN between two locations, and use Haproxy to work as load balancer, then add two VMs to public load balancer, like this:

    enter image description here

    We can use Haproxy to set primary website, more information about Haproxy, please refer to this link.