Default Container Apps Balancer algorithm

Shea Lavington 0 Reputation points
2023-02-21T10:41:46.11+00:00

Hi,

How does the default load balancer work specifically for container apps?
I've found conflicting information online.

Do all browser http requests use a round-robin algorithm to evenly balance all requests across all replicas, or, does it use IP based allocation to ensure that all requests from an IP only go to a single replica?

Azure Load Balancer
Azure Load Balancer
An Azure service that delivers high availability and network performance to applications.
420 questions
Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
325 questions
{count} votes

1 answer

Sort by: Most helpful
  1. GitaraniSharma-MSFT 49,256 Reputation points Microsoft Employee
    2023-02-21T11:13:51.47+00:00

    Hello @Shea Lavington ,

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

    I understand that you would like to how does the default load balancer work for container apps.

    Azure container apps uses standard load balancers, which is a layer 4 load-balancing service (inbound and outbound) for all UDP and TCP protocols.

    https://video2.skills-academy.com/en-us/azure/container-apps/networking#managed-resources

    https://video2.skills-academy.com/en-us/azure/load-balancer/load-balancer-overview

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

    Azure Load Balancer supports two distribution modes for routing connections to your load-balanced applications:

    • Hash based.
    • Source IP affinity/Session persistence

    The default distribution mode for Azure Load Balancer is a five-tuple hash.

    Hash-based mode has one configuration type:

    • None (hash-based) - specifies that successive requests from the same client may be handled by any virtual machine.

    Refer: https://video2.skills-academy.com/en-us/azure/load-balancer/concepts

    https://video2.skills-academy.com/en-us/azure/load-balancer/distribution-mode-concepts

    https://video2.skills-academy.com/en-us/azure/load-balancer/load-balancer-troubleshoot-backend-traffic#virtual-machines-behind-a-load-balancer-are-receiving-uneven-distribution-of-traffic

    There is a load balancer insight called flow distribution which helps you visualize and manage the number of flows your backend instances are receiving and producing.

    From the Insights blade of your Load Balancer, click on the View detailed metrics and then select the Flow Distribution tab.

    Refer: https://video2.skills-academy.com/en-us/azure/load-balancer/load-balancer-insights#flow-distribution

    NOTE: Please note this feature is in Preview and the functional dependency view and preconfigured dashboard may change to improve this experience.

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


    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments