Skip to main content
Diagram showing an overview of Azure Load Balancer

Azure Load Balancer

This guide provides an objective overview of Azure Load Balancer, exploring different types, key features, use cases, pricing, and comparisons.

Amol Dalvi | May 2, 2025

What is Azure Load Balancer?

Azure Load Balancer is a core Microsoft Azure cloud service that distributes network traffic across multiple resources to ensure application availability, scalability, and performance. It's key to building resilient, scalable applications, distributing incoming traffic across backend resources like VMs, containers, or scale sets to prevent overload and maintain responsiveness.

This is critical for meeting your users’ expectations for high availability, as traffic spikes can overwhelm single servers. Load Balancer prevents this and eliminates single points of failure, rerouting traffic to healthy resources if a server fails.

What are the different types of load balancers available in cloud environments?

Azure Load Balancer's operation at Layer 4 (Transport Layer) of the OSI model is fundamental to its versatility. This placement allows it to work with both TCP and UDP protocols, crucial for handling diverse network traffic. TCP, the connection-oriented protocol, is used for applications needing guaranteed delivery and order, like web browsing and file transfer. UDP, the connectionless protocol, prioritizes speed over reliability, serving applications like video streaming and online gaming.

By operating at Layer 4, Azure Load Balancer can distribute both TCP and UDP traffic, making it suitable for a wide range of applications and workloads, as we see below with the four types of load balancers available.

1. Public Load Balancer

Diagram of a public load balancer.

A Public Load Balancer connects your application to the internet. It distributes incoming internet traffic to your backend resources.

  • Inbound connections: Handles requests from the internet.
  • Public IP address: Receives internet traffic.
  • Use case: Exposing web applications and services to the internet.

2. Internal Load Balancer

Diagram of internal load balancer.

An Internal Load Balancer distributes traffic within your virtual network (VNet) or between VNets. It uses a private IP address and isn't accessible from the internet.

  • Private IP address: Used for internal traffic.
  • Use case: Load balancing between application tiers, distributing traffic to internal APIs, or managing traffic within a microservices architecture.

3. Application Gateway

Diagram of application gateway.

Application Gateway is a specialized load balancer for web applications. It operates at Layer 7 (application layer) and offers advanced features.

  • Layer 7 load balancing: Routes traffic based on application-level information (e.g., URL, headers).
  • SSL offloading: Terminates SSL connections at the gateway, improving backend server performance.
  • Web Application Firewall (WAF): Protects web apps from vulnerabilities.
  • Use case: Optimizing and securing web applications.

4. Traffic Manager

Diagram of a traffic manager.

Traffic Manager is a DNS-based traffic management service that distributes traffic across Azure regions or on-premises datacenters. It's used for global application availability and disaster recovery.

  • Global traffic management: Routes traffic based on methods like performance, priority, or geography.
  • Disaster recovery: Ensures application availability even if a region goes down.
  • Use case: Routing traffic to the closest datacenter, implementing failover strategies.

What are the essential features of a cloud-based load balancer?

Backend pool

Diagram of Azure backend pool.

The backend pool contains the target resources (VMs, virtual machine scale sets, etc.) that receive traffic. The load balancer distributes traffic among these resources.

  • Resource grouping: Organizes the resources that will serve your application.
  • Health probes: Used to monitor the health of the resources in the backend pool.

Frontend IP configuration

This defines how the load balancer receives traffic. For public load balancers, it's a public IP address. For internal load balancers, it's a private IP address within the VNet.

  • Public IP (Public LB): Allows internet access.
  • Private IP (Internal LB): For internal VNet traffic.

Health probes

Health probes monitor the health of your backend resources. The load balancer only sends traffic to healthy resources.

  • TCP probes: Check if a TCP port is open and listening.
  • HTTP/HTTPS probes: Check if a web server is responding correctly.

Load balancing rules

Rules define how traffic is distributed to the backend pool.

  • Round robin: Distributes traffic sequentially to each resource.
  • Least connections: Sends traffic to the resource with the fewest active connections.
  • Session persistence (Sticky Sessions): Maintains client sessions with specific backend servers.

Network Address Translation (NAT)

NAT translates public IP addresses to the private IP addresses of your backend VMs. This allows your VMs to be accessible from the internet while remaining secure within your VNet.

Scalability

Load Balancer automatically scales to handle increasing traffic demands. It can distribute traffic across a growing number of backend resources.

  • Elasticity: Adapts to changing traffic loads.
  • Integration with VM scale sets: Scales your backend resources automatically.

High availability and redundancy

Load Balancer provides redundancy and failover capabilities.

  • Availability zones: Distribute your resources across multiple availability zones for fault tolerance.
  • Automatic failover: If one resource fails, traffic is automatically redirected.

Network Security Groups (NSGs) and Firewalls

NSGs and firewalls integrate with load balancers to secure your applications.

  • NSGs: Control inbound and outbound traffic at the network level.
  • Firewalls: Provide advanced network security features.

Metrics and monitoring (Azure Monitor)

Azure Monitor allows you to track load balancer performance and health.

  • Performance metrics: Monitor traffic, connections, and latency.
  • Health monitoring: Track the status of backend resources.

What are the different tiers or levels of load balancing services available? 

Azure Load Balancer offers two SKUs: Basic and Standard. Carefully consider your application's requirements for high availability, scalability, features, and budget. 

This feature comparison table will help you compare:

Feature Basic Load Balancer Standard Load Balancer
Global Load Balancing No Yes (with Traffic Manager)
Availability Zones No Yes
Virtual Machine Scale Sets Limited Support Full Support
Health Probes TCP, HTTP TCP, HTTP, HTTPS
Session Persistence None Configurable (IP Hash, Client IP, Client IP and Protocol)
Outbound Connections Provided via SNAT Provided via SNAT and outbound rules
TCP/UDP Protocols Supported Supported
Load Balancing Algorithms Hash-based distribution Hash-based distribution, Least Connections, etc.
Pricing Lower Higher
SLAs No SLA Yes

Key differences explained

  • Global load balancing: Basic Load Balancer is regional. Standard Load Balancer can be used with Traffic Manager for global traffic distribution.
  • Availability zones: Standard Load Balancer supports deploying resources across availability zones for increased fault tolerance. Basic does not.
  • Virtual machine scale sets: Standard Load Balancer integrates seamlessly with virtual machine scale sets, enabling automatic scaling of your application. Basic has more limited support.
  • Health probes: Standard Load Balancer supports HTTPS health probes, allowing for more comprehensive health checks.
  • Session persistence: Standard Load Balancer offers configurable session persistence (sticky sessions) to maintain client connections with specific servers. Basic offers no session persistence.
  • Outbound connections: While both SKUs provide outbound connectivity, Standard Load Balancer offers more control and flexibility through outbound rules.
  • Pricing: Basic Load Balancer is a more cost-effective option for simple scenarios. Standard Load Balancer is priced higher but offers more features and capabilities.
  • SLAs: Standard Load Balancer has published SLAs, enhancing its reliability.

How do I determine which tier of load balancing is appropriate for my applications?

  • Basic Load Balancer. If you have a simple application and cost is a primary concern, Basic Load Balancer might be sufficient. You can upgrade from Basic to Standard later, if your needs change.
    • Simple applications with regional traffic.
    • Cost-sensitive deployments.
    • Development and testing environments.
  • Standard Load Balancer. If you need global load balancing, availability zones, or advanced features like session persistence, Standard Load Balancer is the right choice. 
    • Production applications requiring high availability and scalability.
    • Applications using virtual machine scale sets.
    • Applications needing session persistence.
    • Applications requiring more advanced features and control.

When should I use a load balancer for my applications?

Azure Load Balancer is a versatile tool. Here are some common use case scenarios:

  • Web applications: Distributing traffic across web servers for high availability and scalability. Imagine an e-commerce site handling a flash sale – the load balancer ensures the site remains responsive even with a massive influx of users.
  • Microservices: Load balancing between microservices, enabling independent scaling and deployment. This allows different parts of an application to scale as needed.
  • Containerized applications: Distributing traffic to containers in Azure Kubernetes Service (AKS) or other container orchestration platforms.
  • N-Tier applications: Load balancing between different tiers of an application (e.g., web tier, application tier, database tier).
  • Internal applications: Distributing traffic for internal applications within a corporate network.
  • Gaming platforms: Handling player connections and game server load.
  • Video streaming: Distributing streaming traffic for a smooth viewing experience.
  • Disaster recovery: Using Traffic Manager with load balancers in different regions to ensure application availability in case of a regional outage.

What factors affect the cost of load balancing?

Azure Load Balancer pricing is based on usage, including the number of load balancers deployed, the amount of data processed, and any associated features used. Key pricing factors include:

  • Load balancer instance: A small hourly charge for each load balancer deployed.
  • Data processed: Charges based on the volume of data processed by the load balancer.
  • Outbound NAT rules (Standard LB): Costs associated with configuring outbound NAT rules.
  • Inbound data transfer: Charges for data entering the Azure datacenter. (Often free or included with other services).

Pricing varies by region and SKU (Basic vs. Standard). The Standard Load Balancer generally has higher costs than the Basic Load Balancer due to its advanced features.

We recommended you consult the official Azure pricing page for the most up-to-date pricing details, as costs can change. The Azure pricing calculator can also help estimate costs based on your specific usage patterns.

What can I do in the Azure portal?

You can manage load balancers through the Azure portal. The portal provides a user-friendly interface for creating, configuring, and monitoring your load balancers. Key tasks you can perform in the portal include:

  • Creating a load balancer: Defining the load balancer's name, region, SKU, and other basic settings.
  • Configuring backend pools: Adding virtual machines or other resources to the backend pool.
  • Setting up health probes: Configuring health probes to monitor the health of your backend resources.
  • Defining load balancing rules: Creating rules to define how traffic is distributed to the backend pool.
  • Monitoring performance: Viewing metrics and logs to track the performance and health of your load balancers.
  • Managing IP addresses: Assigning and managing public and private IP addresses associated with your load balancers.

How can a load balancer be integrated with other Azure services?

Load Balancer seamlessly integrates with other Azure services to enhance your application architecture:

  • Virtual machines: Load balancers distribute traffic to virtual machines hosting your application.
  • Virtual machine scale sets: Load balancers work with VM scale sets to automatically scale your application based on demand.
  • Virtual network: Load balancers reside within your virtual network (VNet), providing secure and isolated traffic distribution.
  • Application Gateway: Application Gateway can be used in conjunction with load balancers for advanced Layer 7 routing and security.
  • Traffic Manager: Traffic Manager uses load balancers in different regions to provide global traffic management and disaster recovery.
  • Azure Kubernetes Service (AKS): Load balancers are used to expose applications running in AKS clusters to internal or external traffic.
  • Azure Firewall: Azure Firewall integrates with load balancers to provide network-level security and protect your applications.

What are the key differences between the Azure and AWS Load Balancers?

Both Azure and AWS offer load balancing services, but they have some key differences:

  • Terminology: AWS uses different terminology (e.g., Application Load Balancer, Network Load Balancer).
  • Feature sets: While both platforms offer similar core functionalities, specific features and their implementations may vary.  
  • Ecosystem: The load balancers are integrated into their respective cloud ecosystems (Azure and AWS), impacting how they interact with other services.

This comparison table will help you compare. It focuses on high-level concepts and avoids feature-by-feature parity:

Feature Azure Load Balancer AWS Load Balancer
Types Public, Internal, Application Gateway, Traffic Manager Application Load Balancer, Network Load Balancer, Classic Load Balancer
Global LB Traffic Manager Global Accelerator, Route 53 Traffic Flow
Layer 7 LB Application Gateway Application Load Balancer
Layer 4 LB Public/Internal Load Balancer Network Load Balancer, Classic Load Balancer
Pricing Based on usage (instance, data processed) Based on usage (LCUs, data processed)
Integration Integrates with other Azure services Integrates with other AWS services

More Resources

  • Microsoft Azure documentation: The official documentation provides comprehensive information, including detailed guides, tutorials, and API references.
  • Nerdio resources: Check out Nerdio's resources on Azure best practices and management.
  • Microsoft Azure Community: Engage with the Azure community through forums, Q&A sites, and other online platforms.

Frequently Asked Questions

About the author

Amol Dalvi

VP, Product

Software product executive and Head of Product at Nerdio, with 15+ years leading engineering teams and 9+ years growing a successful software startup to 20+ employees. A 3x startup founder and angel investor, with deep expertise in Microsoft full stack development, cloud, and SaaS. Patent holder, Certified Scrum Master, and agile product leader.

Ready to get started?