Azure VMs, Monitoring and Load Balancing

jbassking 106 Reputation points
2022-01-14T18:33:59.637+00:00

I have two Windows VMs behind a load balancer with monitoring setup on both VMs. When checking the CPU utilization, I notice that the load isn't evenly balanced. Here's what I'm seeing. Does this look normal for a 24 hour period? When checking for a shorter time period, it seems like the balancing isn't even.

These are Standard B2s VMs. They're hosting an API. Looking at the most recent server requests, we're getting 600k-750k in the last 7 days. We're using the Azure Basic LB with 2 http and 2 https backend pools.

24 Hours
165234-screenshot-2022-01-13-230046.png

1 Hour
165242-1-hour.png

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,645 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,013 questions
Azure Load Balancer
Azure Load Balancer
An Azure service that delivers high availability and network performance to applications.
506 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. msrini-MSFT 9,291 Reputation points Microsoft Employee
    2022-01-15T06:00:24.637+00:00

    @jbassking ,

    Azure Load balancer does hash based load balancing. Here are few things to keep in mind when you perform Load balancing with Azure Load Balancer:

    1. Make sure you select the Session Persistence as None to load balance traffic based on 5 tuple.
    2. Make sure that the Second VM is responding to the probes. If the probes are down for 2nd VM, then the Load balancer will not forward the traffic to that VM.
    3. CPU utilization is not always the right method to check the load is being balanced. There might be multiple factors associated. But I get that having less load for majority of time from your screenshot hints no traffic is sent to that VM during that time.

    With the above suggestion, I think you should be able to get your Load balancing on track. If you have any questions, let me know.

    Regards,
    Karthik Srinivas

    1 person found this answer helpful.

  2. Devaraj G 2,096 Reputation points Volunteer Moderator
    2022-01-15T10:28:36.533+00:00

    Hi,

    Azure Load Balancer doesn't support true round robin load balancing but supports a hash based,
    Check your Flow Distribution tab to get better understanding and this will help you visualize and manage the number of flows your backend instances are receiving and producing. See if there is lots of uneven loads.

    I think what you seeing is normal. Check out this article to understand the traffic flow for hash based.
    https://learn.microsoft.com/en-us/azure/load-balancer/distribution-mode-concepts


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.