Azure Load Balancer to Check if HTTP Response Has No Status Code

Josh Monreal 46 Reputation points
2022-05-23T10:22:58.633+00:00

Hi, is it possible for Azure Load Balancer to check if an HTTP response does not have a status code?

We have an application that is deployed in two Azure VMs (let's call it VM1 and VM2) using IIS. An Azure Load Balancer is created to route requests to one of these two. There is also an automated process created in them which restarts the application pools at a specified time of the day.

Recently we encountered a problem wherein an HTTP request was sent to VM1 while the automated process was running. Since our application was in an unresponsive state during this time it returned an HTTP response of Canceled. Because the VM itself is up and running, the load balancer assumed that it can route the requests there.

Is there a way for us to solve this problem? Can we force the load balancer to route all requests to VM2 at a specified time?

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

Accepted answer
  1. Luis Rodriguez 6,191 Reputation points Microsoft Employee
    2022-05-23T10:28:17.78+00:00

    Hello @Josh Monreal

    Welcome to Microsoft Q&A Platform,

    Azure Load Balancer works at layer 4 hence won't check that at application layer:

    https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-overview

    If you want to to check to check that you may want yo use an Application Gateway which works at layer 7:

    https://learn.microsoft.com/en-us/azure/application-gateway/overview

    I hope this helps!

    ----------

    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


0 additional answers

Sort by: Most helpful