How I can use Load Balancer as High availability setup.

Diksha Singh 60 Reputation points
2023-02-24T07:04:04.63+00:00

Hi,

scenario :

  1. We have two VMs.
  2. One VM will be active and the other VM will be in the passive state.
  3. We should have one unique or one single IP as VIP.
  4. VIP should always redirect to the active VM always.
  5. But Once the active VM is done that VIP should redirect to the passive VM.

Need Some Help How We can achieve this.

Azure Load Balancer
Azure Load Balancer
An Azure service that delivers high availability and network performance to applications.
506 questions
{count} votes

1 answer

Sort by: Most helpful
  1. KapilAnanth-MSFT 49,536 Reputation points Microsoft Employee Moderator
    2023-02-24T07:21:43.98+00:00

    @Diksha Singh

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    I understand that you would like to configure Active-Passive set up for HA using Azure LB and a VIP

    Please note that you should not be configuring this in the Azure LB, rather, you should configure this in the backend VMs.

    • You have to use the IP of the LB (both Public or Private) as the VIP in each of the Backend VMs
    • In Azure LB, you have to enable Floating IP (this tells the LB that the backend is using LB's IP as VIP) and LB does not change the destination IP to the actual IP of the VM, rather leaves it to be the IP of the LB (backends would see this as their VIP)
    • Now, configuring the OS to support VIP depends on the OS you are using. The below section provides configuration for the following
      User's image
    • Now, you should configure the backends to be active-passive, i.e,
      passive instance should not respond to health probes.
      Thus, Azure LB will only send traffic to the Active instance.
      During a switch over, the active instance will start to fail the health checks, and the passive instance will pass the health checks.
      However, the traffic will go to the same IP (i.e, VIP which is configured in both the VMs )

    In summary,

    • The VIP will not move between the active and passive VMs, as we do in conventional load balancing.
    • Instead, the VIP is always present in both the VMs
    • The routing is based on the health check failure, whenever a VM fails the health check, LB marks it as passive and only sends traffic to the other one(active)

    Kindly let us know if this helps or you need further assistance on this issue.

    Thanks,

    Kapil


    Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.