Azure Internal Load Balancer is not distributing the load evenly

Balakumar Venkataramanan 0 Reputation points
2024-08-19T18:02:52.5333333+00:00

We have a svc which is configured to use azure internal Load balancer. We are running 6 pods, but the load is not getting distributed evenly. Please check and help

SVC is attached.

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,073 questions
Azure Load Balancer
Azure Load Balancer
An Azure service that delivers high availability and network performance to applications.
432 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ChaitanyaNaykodi-MSFT 25,841 Reputation points Microsoft Employee
    2024-08-20T02:11:09.3+00:00

    @Balakumar Venkataramanan

    Thank you reaching out.

    I understand you observed an un-even distribution of traffic to the backend pool members of your load balancer.

    The observation will likely be due to the distribution mode selected, as documented here

    If you suspect backend pool members are receiving traffic, it could be due to the following causes. Azure Load Balancer distributes traffic based on connections. Be sure to check traffic distribution per connection and not per packet. Verify using the Flow Distribution tab in your preconfigured Load Balancer Insights dashboard.

    Azure Load Balancer doesn't support true round robin load balancing but supports a hash based distribution mode.

    The hash is used to route traffic to healthy backend instances within the backend pool. The algorithm provides stickiness only within a transport session. When the client starts a new session from the same source IP, the source port changes and causes the traffic to go to a different backend instance. In order to configure hash based distribution, you must select session persistence to be None in the Azure portal. This specifies that successive requests from the same client can be handled by any virtual machine.

    Based on your observation above even if you have enabled hash based distribution the load distribution can be skewed if for example the source ip remains the same and the source ports remains the same. This can be avoided if source port can be changed/ reused to get more even distribution of traffic.

    Hope this helps! Please let me know if you have any additional questions. Thanks!

    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.