Cloud service · Azure · Updated

Azure Load Balancer - Azure Load Balancer is a managed Layer 4 service that distributes TCP and UDP traffic across Azure virtual machines and Virtual Machine Scale Sets.

In short

Azure Load Balancer provides public and private network endpoints, health-based traffic distribution, and configurable outbound connectivity for virtual machine workloads. It supports regional deployments, availability-zone resilience, and global load balancing across regional public load balancers, without terminating TLS or performing application-layer routing.

Cloud Services Hub →

9 key features of Azure Load Balancer

01
Public and internal frontends

Expose internet-facing services through public IP addresses or private services through internal frontend IP addresses. Configure separate rules and frontends when applications require different ports or network exposure.

02
Flow-based TCP and UDP distribution

Distribute connections using five-tuple hashing while preserving the inbound client source IP. Optional two-tuple or three-tuple affinity supports client-IP-based persistence, with a potential trade-off in distribution fairness.

03
Health probes and backend administration

Use TCP, HTTP, or HTTPS probes to control backend eligibility for new flows. Administrative State lets operators override probe behavior for individual instances during maintenance, while backend health status provides diagnostic reasons.

04
Availability-zone and global architectures

Use zonal or zone-redundant frontend configurations and spread backends across zones. For public multi-region services, place a global load balancer in front of regional Standard Load Balancers and separately implement application and data redundancy.

05
Explicit outbound SNAT

Configure outbound rules on a public Standard Load Balancer to provide backend internet egress through selected frontend public IP addresses. Size SNAT port allocations for expected concurrency and monitor for exhaustion.

06
Inbound NAT rules

Map a frontend port to a specific backend instance rather than distributing that connection across the pool. Use inbound NAT rules v2 for scale-set access, and restrict management access instead of exposing administrative ports broadly.

07
HA ports and floating IP

An HA ports rule on an internal Standard Load Balancer distributes flows across all TCP and UDP ports, supporting network virtual appliance deployments. Floating IP supports selected clustering and port-reuse designs but requires the corresponding guest operating system configuration.

08
Operational metrics and health events

Use Azure Monitor metrics, Load Balancer Insights, backend health status, and health event logs to diagnose availability and traffic-distribution issues. Byte, packet, and SYN count metrics support a protocol dimension for separating TCP and UDP observations.

09
Cross-subscription configurations

Supported configurations allow frontend public IP resources or backend instances to reside in subscriptions different from the load balancer. Apply the required permissions and networking constraints when separating shared network resources from application ownership.

Where Azure Load Balancer is used

  1. 01
    Internet-facing TCP and UDP services

    Expose services such as game servers, messaging endpoints, or custom TCP applications through a public Standard Load Balancer. Keep TLS termination on the application instances and use application-aware health endpoints where appropriate.

  2. 02
    Private application tiers

    Provide a stable private endpoint for an application tier used by other services over connected virtual networks. An internal load balancer distributes flows without requiring a public endpoint on that tier.

  3. 03
    Highly available network appliances

    Use an internal Standard Load Balancer with HA ports to distribute traffic across supported firewall, routing, or other network virtual appliance instances. Validate appliance-specific routing, flow symmetry, and failover requirements.

  4. 04
    Multi-region public service availability

    Place a global load balancer ahead of regional public Standard Load Balancers to direct new traffic toward healthy regional deployments. Design regional application capacity and data replication so the surviving region can actually serve the workload.

  5. 05
    Scaling virtual machine workloads

    Associate a Virtual Machine Scale Set with a backend pool so additional instances can serve incoming connections as capacity grows. Coordinate application readiness, health probes, and scale-in behavior to avoid sending traffic to unready instances.

  6. 06
    Controlled public egress

    Use outbound rules to give backend virtual machines a defined set of public source IP addresses for outbound connections. Check SNAT capacity and compare the design with Azure NAT Gateway when connection scale or subnet-wide egress management is the primary requirement.

How Azure Load Balancer is priced

Standard regional usage-based pricing

Standard Load Balancer charges are based on configured load-balancing and outbound rules and the volume of data processed. Rule pricing uses published tiers, so estimate both rule-hours and processed traffic rather than treating the service as a fixed monthly appliance.

Global load balancing

Global deployments have their own applicable load-balancing rule and data-processing rates. Budget for the global layer, regional load balancers, public IP addresses, and applicable network transfer charges.

Gateway SKU metering

Gateway Load Balancer uses separate gateway-hour and data-processing meters for network virtual appliance insertion scenarios. Appliance virtual machines, vendor licenses, and related networking resources are additional costs.

Associated infrastructure and observability

Public IP addresses, virtual machines, outbound bandwidth, and diagnostic log ingestion or retention can add charges independently of load balancing. Rates vary by region, currency, and agreement; Basic Load Balancer is retired and should not be used as a free deployment option.

Services Azure Load Balancer works with

A common regional architecture places virtual machines or a Virtual Machine Scale Set across availability zones behind a Standard Load Balancer. The frontend provides a stable endpoint, while virtual networks, network security groups, and host firewalls determine reachability. Health probes should reflect application readiness, and scale-set autoscaling should be coordinated with startup and shutdown behavior. For private tiers, use an internal frontend reachable through explicitly configured peering or hybrid connectivity.

AKS uses the same platform service for supported Kubernetes LoadBalancer services, but the cluster controller owns the relevant resource configuration. Manage those endpoints through Kubernetes manifests and supported AKS settings. Where internet egress needs dedicated source addresses or greater SNAT capacity, combine inbound load balancing with NAT Gateway on the backend subnets rather than relying on implicit outbound connectivity.

Across these architectures, use Azure Monitor alerts and health event logs alongside application telemetry to distinguish probe failures, backend faults, and outbound port pressure. Multi-region designs add a global load balancer above regional public load balancers, but still require independent planning for replicated data, application state, and regional failover capacity.

Virtual Machines

Virtual machine network interfaces or supported backend IP configurations populate a regional backend pool. For example, place three application VMs across availability zones behind a zone-redundant frontend and probe an application readiness endpoint. Configure network security groups and host firewalls to admit both client traffic and health probes.

Azure Kubernetes Service (AKS)

AKS can provision and manage Azure Load Balancer resources for Kubernetes Services of type LoadBalancer. For example, expose a UDP service publicly or use the appropriate Azure service annotation to create an internal endpoint. Make changes through supported Kubernetes and AKS configuration rather than manually editing controller-managed load balancer resources.

Azure Virtual Network

Internal frontends obtain private IP addresses from a virtual network subnet, and backend reachability depends on the surrounding network configuration. For example, expose a private application tier to a peered application network or to on-premises clients connected through VPN or ExpressRoute. Validate routing, address-space overlap, and network security rules along the complete path.

Azure Monitor

Azure Monitor collects platform metrics and supports alerts for availability, probe health, and connection-related indicators. For example, alert when backend health declines and send supported health event logs to a Log Analytics workspace for investigation. Correlate load balancer observations with guest and application telemetry because transport-level health alone does not establish application correctness.

Azure NAT Gateway

NAT Gateway can provide outbound internet connectivity for a subnet while a public or internal load balancer handles inbound distribution. For example, retain a public load balancer for application ingress and attach NAT Gateway to backend subnets for outbound API calls through dedicated egress IP addresses. NAT Gateway takes precedence for new outbound internet connections where both mechanisms apply, so update external IP allowlists and validate existing connection behavior during migration.

API Management

An internal Azure Load Balancer provides the private frontend for API Management instances deployed in internal virtual network mode. Clients that can reach the virtual network can call the API gateway without exposing it to the public internet.

App Service

An internal load balancer gives an internal App Service Environment a private inbound IP address. Apps in the environment can receive requests from connected networks without exposing a public application endpoint.

Azure Adaptive Virtual Patching

Gateway Load Balancer can steer workload traffic through Azure Adaptive Virtual Patching for inspection. The service can block traffic that exploits a known vulnerability while the underlying workload awaits a software patch.

Azure Advisor

Azure Advisor evaluates Load Balancer configurations and surfaces resource-specific recommendations. For example, it can identify a load balancer that should be upgraded from the retired Basic SKU to Standard.

Azure App Testing

A load balancer can be added as a monitored application component in an Azure load test. This lets you compare server-side metrics such as data path availability and SNAT connection counts with the load test's request rate and errors.

Alternatives to Azure Load Balancer in other clouds

AWS

Elastic Load Balancing (ELB)Elastic Load Balancing (ELB)

AWS Elastic Load Balancing’s Network Load Balancer (NLB) and Azure Load Balancer distribute TCP and UDP traffic across healthy backends. AWS offers HTTP request routing through a separate type, Application Load Balancer (ALB), while Azure Load Balancer routes at Layer 4 and leaves TLS termination to the backend or a separate proxy.

Compare fact by fact
Azure Load BalancerElastic Load Balancing (ELB)
Network load balancing chargesStandard rule-hours + data processedNLB running hours + capacity units
AWS Global AcceleratorAWS Global Accelerator

AWS Global Accelerator and Azure Load Balancer route traffic to healthy backends and support failover across regions. AWS Global Accelerator routes traffic to regional application endpoints, while Azure’s global load balancer routes traffic through regional public Standard Load Balancers.

Compare fact by fact
Azure Load BalancerAWS Global Accelerator
Global routing targetsRegional public Standard Load BalancersRegional application endpoints
Hourly billingConfigured rule-hours, tiered rates$0.025 per accelerator-hour
Traffic billingVolume of data processedPer GB in each hour's busier direction
Inbound client IP preservationPreserved for inbound flowsOptional on supported standard endpoints

What is Azure Load Balancer

3 min read

Azure Load Balancer distributes network flows across backend virtual machines or Virtual Machine Scale Sets. It operates at Layer 4 for TCP and UDP, making it suitable for services that need transport-level load balancing rather than HTTP routing. TLS sessions terminate on the backend application or a separate proxy, not on the load balancer. It does not inspect application payloads, rewrite HTTP headers, provide a web application firewall, or route requests by URL path.

A regional deployment consists of frontend IP configurations, backend pools, load-balancing rules, and health probes. A public frontend accepts internet traffic through a public IP address. An internal frontend uses a private IP address for clients with network connectivity to the virtual network, including appropriately connected peered networks and on-premises networks. Rules map a frontend protocol and port to a backend pool and port. Multiple frontend IP addresses and rules can expose different services through the same load balancer.

Traffic distribution uses a five-tuple hash comprising source IP address, source port, destination IP address, destination port, and protocol. Distribution happens per flow, not per application request, and does not guarantee equal connection counts across instances. Optional source-IP-based affinity can keep connections from a client on the same backend, but clients sharing a NAT address can cause uneven distribution. The original client source IP is preserved for inbound flows, although additional proxies elsewhere in the architecture can change what the application sees.

Configure TCP, HTTP, or HTTPS health probes to identify backends that can accept new flows. HTTP-based probes should target an endpoint that reflects application readiness rather than merely confirming that the operating system is running. Permit probe traffic through network security groups and host firewalls, and separately allow the required application traffic. Standard Load Balancer requires explicit inbound access controls. A failed probe stops new flows to an affected backend; it does not automatically terminate established TCP connections. Administrative State can override probe-based eligibility during maintenance.

For zone resilience, use a zone-redundant frontend where supported and distribute backend instances across availability zones. A resilient frontend does not compensate for an application tier deployed entirely in one zone. Global load balancing provides a separate public endpoint backed by regional Standard Load Balancers, supporting regional failover and geographic proximity routing. Application replication, shared state, and data recovery remain responsibilities of the workload architecture.

Design outbound connectivity explicitly. Public Standard Load Balancer outbound rules provide source network address translation for backend instances, but port allocation, connection concurrency, and idle timeouts require capacity planning. Azure NAT Gateway is an alternative for subnet-level internet egress. Internal load balancing alone does not provide internet outbound connectivity. Configure TCP reset and appropriate keepalive behavior when applications maintain long-lived connections.

Use Standard Load Balancer for general-purpose deployments; Basic Load Balancer was retired on September 30, 2025. Prefer inbound NAT rules v2 for Virtual Machine Scale Sets rather than legacy inbound NAT pools. Monitor frontend availability, backend probe health, traffic volume, and SNAT utilization with Azure Monitor, and use health event logs to investigate availability problems. Manage configuration through infrastructure as code, and test backend failure, zone failure, maintenance, and outbound connection pressure before production rollout.

Azure architecture icons are the property of Microsoft. BlowStack is not affiliated with or endorsed by Microsoft.

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.