Azure Load Balancing

Azure Load Balancer is a Layer 4 (TCP/UDP) load balancer that enables you to distribute network traffic to applications and services hosted in Azure. It provides high availability and responsiveness for your applications by distributing incoming traffic across multiple virtual machines or instances. Load Balancer operates across Availability Zones, providing resilience.

Key Concepts

Types of Azure Load Balancers

Azure offers different load balancing solutions based on your needs:

When to Use Azure Load Balancer

Azure Load Balancer is ideal for scenarios requiring high availability and scalability for applications where traffic distribution at the transport layer (TCP/UDP) is sufficient. It's commonly used for:

Configuring Load Balancer

You can configure Azure Load Balancer using the Azure portal, Azure CLI, PowerShell, or ARM templates.

Example: Creating a Load Balancer Rule (Azure CLI)


az network lb rule create \
    --resource-group MyResourceGroup \
    --lb-name MyLoadBalancer \
    --name MyHttpRule \
    --protocol Tcp \
    --frontend-port 80 \
    --backend-port 80 \
    --frontend-ip-name MyFrontendIP \
    --backend-pool-name MyBackendPool
            
Note: For more advanced features like URL-based routing, SSL termination, and WAF, consider using Azure Application Gateway.
Important: Ensure your health probes are configured correctly to accurately reflect the health of your back-end services.

Learn More