Azure Front Door does not load balance using VM IPs for origin

Gopal Chandra Nepal 20 Reputation points
2024-03-22T03:00:01.9566667+00:00

I am new to Azure cloud and I am trying to deploy Azure Front Door to divert traffic between two VMs (also in Azure. It uses docker Nginx managed from IoT Hub).

I have created an endpoint, which then uses a route with an origin group. In the origin group, I have added two VMs using their public IP address (I also tried with a custom domain name). When I enable Ngingx on both the VMs azure front door works fine, if I stop the Nginx on priority 1 origin, I see an error:

Our services aren't available right now We're working to restore all services as soon as possible. Please check back soon.

I would have expected it to use the other origin automatically if one origin fails. However, if I manually disable one origin, then it does send the request to the other origin.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,167 questions
Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
708 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sedat SALMAN 14,145 Reputation points MVP
    2024-03-23T12:53:25.6533333+00:00

    When using Azure Front Door for load balancing between two VMs, it should automatically route traffic to the second VM if the first one fails

    but you need to be careful for the following condiguration

    • Azure Front Door configuration > Origin Group > Health Probes.
    • Check: Protocol: Does the protocol (HTTP or HTTPS) align with your Nginx setup on the VMs? Interval: Is the interval frequent enough to detect failures quickly?

    then

    • Azure Front Door configuration > Backend Pools
    • Check that the VMs and their health probe status is "Healthy."
    • Ensure Priority and Weight settings are configured correctly
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.