Networking, Identity & Security · Guide

Azure Load Balancer Use Cases and WSFC Connectivity

Choose Azure Load Balancer for practical TCP/UDP scenarios and design reliable VM, hybrid, AKS, appliance, and WSFC connectivity with testable failure behavior.

Azure Load Balancer gives clients a stable IP address and forwards eligible network flows to healthy backends. It fits services that need TCP or UDP distribution, private application access, or a supported virtual IP for a clustered workload. The design still needs an application that can recover, enough surviving capacity, and clients that reconnect.

Purpose and scope

This guide applies the library's load-balancing and network-security standards to common Azure scenarios. It covers regional Standard Load Balancer, its Global tier, and the separate Gateway SKU. Public and internal describe frontend exposure; they are not separate SKUs. Basic Load Balancer was retired on September 30, 2025; use Standard for new VM-based designs and plan migration for legacy resources. See the Azure Load Balancer overview.

The WSFC section explains client connectivity for a supported single-subnet virtual network name (VNN) design. It is not a universal installation procedure for every Windows Server Failover Clustering application.

How the traffic path works

ComponentWhat to configureQuestion to answer
Frontend IPPublic IP or private address from a subnetWhich clients should reach this endpoint?
Backend poolEligible VM NIC configurations or supported IP-based membershipWhich instances provide the same service?
Load-balancing ruleFrontend protocol/port, backend port, pool, and probeHow should matching flows reach the service?
Health probeTCP, HTTP, or HTTPS readiness checkCan this instance accept new work?
Inbound NAT rulePort mapping to an individual backendIs this per-instance access rather than distribution?
Outbound ruleExplicit public frontend SNAT for a backend poolWhich public source IPs and port allocation should egress use?

For normal regional distribution, the default hash uses source IP, source port, destination IP, destination port, and protocol. A TCP connection remains associated with its selected backend; HTTP requests on one persistent connection do not rotate across VMs. Source-IP affinity is available, but shared NAT addresses can concentrate traffic on one backend. See distribution modes.

flowchart LR C[Authorized clients] -->|TCP or UDP| F[Standard Load Balancer frontend] subgraph V[Application VNet - backend security boundary] F --> R[Rule and backend selection] R --> A[VM A - ready] R --> B[VM B - ready] P[Platform health probes] -.-> A P -.-> B end

The solid arrows show client flows; dotted arrows show separate readiness checks. NSGs and host firewalls permit the required client and probe paths. A backend that fails its probe stops receiving eligible new flows; the load balancer does not restart its application.

Typical use cases

Distribute connections across application VMs

Example: Several VMs run the same custom TCP service or UDP collector. Use a public Standard frontend for approved internet clients, or an internal frontend for private consumers. Keep local state replaceable or put shared state in a suitable data service.

TLS can pass through to the backend, which owns certificates and decryption. For a public HTTP(S) application, follow the existing requirement for WAF protection and choose an appropriate Layer 7 entry service. Load Balancer alone supplies neither WAF nor HTTP routing.

Problem: A single VM limits connection capacity and creates a backend failure point, while clients need one stable address.

Architecture: Put interchangeable VM NICs in a Standard Load Balancer backend pool. A frontend IP and protocol/port rule define the entry point; a health probe checks the service endpoint, and Azure distributes eligible flows across healthy instances. Permit both client and probe traffic in NSGs and host firewalls, and size the pool for peak load plus a VM failure.

Benefit: Clients keep the same endpoint as instances are replaced or scaled, and an unhealthy VM stops receiving eligible new flows. Existing TCP sessions are not migrated to another VM.

Publish a private enterprise or hybrid service

Example: Branch users connect to an internal business service hosted on two Azure VMs. An internal frontend provides a stable private destination. Private DNS maps the service name to that address; VPN or ExpressRoute supplies hybrid reachability.

flowchart LR O[On-premises clients] --> E[VPN or ExpressRoute] E --> F[Internal Standard frontend] S[Peered VNet clients] --> F subgraph V[Service VNet - private application boundary] F --> A[Application VM A] F --> B[Application VM B] end D[Private DNS] -.->|Service name resolves to frontend| O D -.-> S

The frontend is privately addressed. Reachability also requires correct peering or transit, routes, DNS, NSGs, host firewalls, and return paths. Internal Load Balancer does not authenticate users or create connectivity between networks.

Problem: Branch and peered-network clients need a stable private service address without exposing the application to the internet.

Architecture: Place an internal Standard Load Balancer frontend in the service VNet, with application NICs in its backend pool. Publish the frontend address through private DNS; provide the routes and VPN or ExpressRoute connectivity separately, and allow client and probe paths through NSGs and host firewalls.

Benefit: Consumers use one private name and address while the backend VMs can change. Network reachability and user authentication remain responsibilities of the surrounding network and application.

Keep a stable endpoint while VM Scale Sets change capacity

Example: A worker service scales from a few instances to a larger fleet. Configure backend membership with the VM Scale Set model so healthy instances participate as capacity changes. The scale set and autoscale policy add or remove compute; Load Balancer selects backends for connections.

Make startup readiness meaningful and test scale-in with long-lived connections. A service should stop accepting new work and complete or safely abandon existing work before its instance is removed. See VM Scale Set load-balancing options.

Problem: A worker service needs to add or remove compute without asking clients to track individual instance addresses.

Architecture: Associate the scale set with the load-balancer backend pool and use an application-aware probe that reflects readiness to accept new work. Autoscale changes instance count; Load Balancer admits healthy instances to new flows. Coordinate scale-in with connection draining or application shutdown because the load balancer does not move established sessions.

Benefit: The service endpoint stays fixed while pool membership follows scale operations. Separating the autoscale signal from the load-balancer probe also lets operators control capacity and traffic readiness independently.

Expose a Kubernetes service in AKS

Example: An AKS application needs an external TCP endpoint. A Kubernetes Service with type: LoadBalancer integrates with Standard Load Balancer; supported annotations can request an internal service instead.

Manage the service through Kubernetes and the supported AKS configuration. Manual edits to AKS-managed load-balancer resources are unsupported and can be reconciled away. Validate probe behavior and client source-IP requirements against the chosen externalTrafficPolicy. Use an ingress or gateway implementation when HTTP routing is required. See AKS Standard Load Balancer integration.

Problem: Pods are replaceable and their addresses change, but TCP or UDP clients need a reachable service endpoint.

Architecture: Declare a Kubernetes Service with type: LoadBalancer; the AKS cloud provider provisions and reconciles the Standard Load Balancer resources. Use the supported internal-load-balancer annotation when the frontend must be private. Choose externalTrafficPolicy: Cluster or Local deliberately because it affects source-IP preservation and which nodes can receive traffic; use an ingress or gateway for HTTP host/path routing.

Benefit: Kubernetes owns endpoint membership as Pods and nodes change, and clients receive a stable Layer 4 frontend. Keeping configuration in Kubernetes avoids drift from manual edits to AKS-managed Azure resources.

Survive a backend or availability-zone failure

Example: A regional service must continue after one availability zone fails. Combine a zone-redundant frontend with backends spread across zones in a supported region. These are separate configuration choices: a resilient frontend cannot serve requests if every backend is in the failed zone.

Size the surviving instances for the expected demand and include the database, identity service, and other dependencies in failure tests. Zone redundancy does not provide regional disaster recovery. See Load Balancer reliability guidance.

Problem: A regional service must continue when a VM or an entire availability zone becomes unavailable.

Architecture: Spread backend instances across zones and configure a zone-redundant frontend where supported. Health probes remove unhealthy backends from new-flow selection. Design the remaining zones to carry expected failover demand, and test dependencies such as databases and identity services under the same failure scenario.

Benefit: The service can continue through a zonal failure without changing its regional endpoint. This design does not protect against loss of the entire Azure region; use a separate multi-region architecture for that recovery objective.

Provide a stable WSFC or SQL Server endpoint

Example: A supported single-subnet SQL Server FCI uses a VNN and one client-facing IP. An internal Standard Load Balancer can direct connections to the node that owns that clustered resource. This is active/passive connectivity, rather than distributing writes across both nodes. The next section explains the packet delivery and failover responsibilities.

Problem: A clustered SQL Server role moves between WSFC nodes, but clients need a stable virtual network name (VNN) address and Azure does not learn a new packet destination from gratuitous ARP.

Architecture: For a supported single-subnet VNN design, assign the VNN frontend to an internal Standard Load Balancer rule, use Floating IP when required by the documented cluster pattern, and probe a role-aware endpoint that is healthy only on the active owner. The cluster controls quorum, role ownership, storage, and SQL failover; the load balancer directs eligible client flows to the owner.

Benefit: Clients retain one endpoint during role movement, while the probe removes the passive node from new-flow selection. This is active/passive connectivity, not write distribution or a replacement for WSFC failover.

Make network virtual appliances available

Example: A hub network needs redundant third-party firewall VMs. An internal Standard Load Balancer with an HA ports rule can distribute flows across an appliance pool without one rule per application port. Use the vendor-supported routing, probe, forwarding, and state-synchronization design.

Flow symmetry has specific topology constraints. Two independently selecting load balancers do not automatically send both directions through the same stateful appliance. HA ports guidance documents the supported combinations.

For transparent inspection of traffic associated with a Standard public frontend or supported VM public IP, evaluate Gateway Load Balancer. Its service chain and VXLAN tunnel interfaces require compatible NVAs. It is a separate appliance-insertion design, not a drop-in internal application load balancer. See Gateway Load Balancer.

Problem: A firewall or inspection tier needs redundant appliance capacity, while stateful appliances require both directions of a flow to traverse a compatible path.

Architecture: For an appropriate internal appliance pool, an HA ports rule (all protocols and ports) can distribute flows across healthy NVA instances; use supported routes, probes, forwarding, and vendor state synchronization. Validate the documented topology for flow symmetry. For insertion in front of a supported consumer public endpoint, Gateway Load Balancer chains the consumer resource to NVAs using VXLAN tunnel interfaces and flow stickiness.

Benefit: The design can scale appliance capacity and remove unhealthy instances without per-application-port rules. Gateway Load Balancer provides transparent appliance insertion; it is distinct from an internal application load balancer.

Give backend VMs explicit outbound connectivity

Example: A VM pool needs a predictable public source IP for a partner allowlist. Standard public Load Balancer outbound rules can define SNAT, ports, and timeouts. Plan port allocation for peak connections and maximum pool size. If an inbound rule shares the same frontend, disable its automatic outbound SNAT before using an explicit outbound rule for that address.

For an outbound-only requirement, evaluate NAT Gateway first. An internal frontend does not itself provide internet SNAT. Avoid depending on implicit default outbound access: new VNet deployments using the API released after March 31, 2026 default to private subnets, while existing networks are not automatically changed. See outbound rules and default outbound access scope.

Problem: Backend VMs need controlled outbound internet access and a predictable public source address, for example to satisfy a partner allowlist.

Architecture: An explicit outbound rule maps backend flows to a public Load Balancer frontend and defines SNAT port allocation and idle timeout. Size port allocation against pool size and peak concurrent connections, and monitor for SNAT exhaustion. For outbound-only workloads, compare NAT Gateway; do not assume an internal frontend provides internet egress.

Benefit: Egress uses a known public IP and explicit capacity settings. This controls outbound SNAT behavior but does not create an inbound service; port exhaustion can still interrupt new outbound connections.

Reach an individual backend with inbound NAT

Example: An approved support workflow needs a unique frontend port mapped to a specific VM. Inbound NAT supplies that mapping; it does not select another healthy application instance or replace a load-balancing rule.

Prefer Azure Bastion or private administrative connectivity for SSH and RDP. Where port forwarding is justified, restrict allowed source addresses and apply the normal access controls. Use inbound NAT rules V2 for pools of VMs or scale sets. VMSS-specific V1 inbound NAT pools retire on September 30, 2027, with creation of new pools blocked from November 15, 2026; single-VM V1 rules are unaffected. See inbound NAT rules.

Problem: An operator needs a direct, temporary path to one VM for a specific support or diagnostic task; normal load-balancing rules would distribute connections instead.

Architecture: Map a unique frontend protocol/port to the selected backend NIC and destination port with an inbound NAT rule. Restrict the source range with network controls and use supported NAT rule versions for VM scale sets. Prefer Azure Bastion or private administration paths for SSH and RDP.

Benefit: The operator can reach a specific instance without exposing an application-wide backend pool. NAT is a one-to-one port mapping: it does not check application health, fail over to another VM, or balance requests.

Route public Layer 4 traffic across regions

Example: A custom TCP service runs in two regions and requires one public anycast endpoint. Standard Load Balancer's Global tier selects healthy regional public load-balancer frontends; the regional layer selects the VM backend.

Global tier supports public frontends, rather than a global private VIP. It does not provide outbound rules, HTTP routing, or application data replication. Test regional dependency failures, client reconnection, and data readiness before claiming disaster recovery. Confirm deployment-region and feature constraints in Global Load Balancer guidance.

Problem: Clients need one public endpoint for a TCP or UDP service deployed in multiple Azure regions, with regional selection and failover.

Architecture: Use a Global-tier public frontend whose backend pool contains regional Standard Load Balancers. The global layer selects a healthy regional frontend; that regional load balancer selects a healthy VM backend. Deploy and operate each region as an independent application stamp, and validate probe signals against actual regional service readiness.

Benefit: A static anycast address can route clients toward an appropriate healthy region without DNS changes. This is Layer 4 traffic distribution: it does not replicate application data, provide a global private VIP, or replace application-level disaster recovery.

WSFC virtual IP connectivity in detail

Separate cluster ownership from packet delivery

On a conventional on-premises subnet, a cluster can move an application VIP between nodes and announce its new IP-to-MAC association through gratuitous ARP. Azure VNet forwarding is controlled by the platform. Adding an address inside a guest or sending that announcement does not register a new Azure forwarding destination.

In a supported Azure VNN design, WSFC still owns quorum, application resources, dependencies, and role movement. Load Balancer provides an Azure-managed frontend and forwards connections according to a cluster-compatible probe. It does not elect a cluster owner, replicate storage, or execute the application failover.

Use a probe that follows the clustered role

The following values are illustrative for a single-subnet SQL FCI VNN, not deployment defaults:

SettingExampleRequired relationship
Internal frontend10.0.0.100Matches the FCI virtual IP
Backend nodes10.0.0.11, 10.0.0.12Both eligible cluster nodes
Application ruleTCP 1433 to 1433Matches the actual SQL listener port
Floating IPEnabled on the application ruleBackend receives the frontend destination IP
Dedicated TCP probe59997Same port on the relevant WSFC IP Address resource
Cluster IP parameters/32 mask, DHCP disabledFollow the documented SQL FCI resource configuration

Follow the workload-specific SQL FCI VNN configuration. SQL availability groups use a listener with their own setup instructions; an AG and an FCI are different architectures.

flowchart TD C[Authorized SQL client] -->|TCP 1433| F[Internal frontend 10.0.0.100] subgraph V[Cluster subnet - SQL service boundary] F -->|Eligible new connection| A[Node 1 - current FCI owner] F -.->|Selected after ownership and probe change| B[Node 2 - standby] P[Dedicated TCP probe 59997] -.->|Healthy on owner| A P -.->|Unhealthy on standby| B W[WSFC role and IP ownership] -.-> A W -.->|Failover moves role| B end

The diagram shows the initial owner and the future failover path. The standby is not a second writable SQL endpoint. Only the node owning the relevant IP resource should answer its dedicated probe; a generic probe listener running on both nodes would invalidate this selection.

Floating IP changes destination-address mapping for a rule. It does not move the Azure NIC IP between nodes. The guest must be configured to accept the frontend destination; follow the cluster instructions rather than applying generic loopback settings indiscriminately. See Floating IP behavior.

Plan recovery and consider supported alternatives

Expect affected SQL sessions to reconnect. Recovery includes cluster detection, quorum decisions, resource startup, probe convergence, and client retry. A green TCP probe proves only its defined readiness condition; run a real database operation as well.

Evaluate distributed network name (DNN) and multi-subnet options before choosing a VNN load-balancer dependency. Support varies with SQL Server version, FCI versus AG, client drivers, and application behavior. These alternatives do not apply automatically to every WSFC application. See SQL FCI connectivity options.

Choose the traffic service by requirement

RequirementStarting point
Regional public or private TCP/UDP distributionStandard Load Balancer
Host/path routing, TLS termination, regional web WAFApplication Gateway with the required WAF configuration
Global HTTP(S), caching, and edge WAFAzure Front Door
DNS-based endpoint selectionTraffic Manager
Predictable outbound-only internet connectivityNAT Gateway
Vendor-supported transparent NVA service chainGateway Load Balancer
Global public TCP/UDP endpoint over regional public load balancersStandard Load Balancer, Global tier

Use the Azure traffic-service comparison with the library's broader load-balancing standard. More than one service can be justified, but each hop should have a defined purpose and owner.

Operational considerations

  • Probe access: For IPv4 probes, allow the AzureLoadBalancer NSG service tag and the platform source 168.63.129.16 in the host firewall on the chosen probe port. This permits probes; application traffic requires its own client-source rules. Choose TCP, HTTP, or HTTPS checks and thresholds deliberately. See health probe behavior.
  • Connection lifecycle: Test idle timeouts, TCP reset behavior, application keepalives, draining, and retries with realistic long-lived sessions. Do not assume established connections migrate to another backend.
  • Observability: Alert on Data Path Availability (VipAvailability), Health Probe Status (DipAvailability), and application synthetic checks. Where outbound SNAT is used, monitor allocated and used ports and connection failures. Correlate timestamps with deployment and cluster events. See the monitoring reference.
  • Change control: Manage persistent configuration through reviewed IaC. Record service ownership, allowed consumers, recovery objectives, surviving capacity, and rollback conditions. Check regional support, quotas, and current pricing when sizing the design.

Validation

Run these checks in a representative non-production environment and retain timestamped configuration, client results, backend health, and recovery duration. The commands below inspect an existing deployment; replace every example value before use.

az network lb show --resource-group rg-example --name lb-example --output json
az network lb rule list --resource-group rg-example --lb-name lb-example --output table
az network lb probe list --resource-group rg-example --lb-name lb-example --output table

For WSFC, inspect the actual application IP resource rather than assuming that the cluster's administrative IP is the listener:

Get-ClusterNode
Get-ClusterGroup
Get-ClusterResource | Where-Object ResourceType -eq 'IP Address'
Get-ClusterResource 'SQL IP Address 1 (SQLRole)' | Get-ClusterParameter

# Run from an authorized client outside the backend pool.
Test-NetConnection -ComputerName sql-service.example.internal -Port 1433
  • Confirm frontend exposure, pool membership, rules, Floating IP where applicable, DNS, and outbound settings against the reviewed design.
  • Perform a real application transaction from every required client network. A TCP test alone is insufficient; use the native client for UDP.
  • Attempt access from a disallowed source and verify denial without preventing legitimate probe traffic.
  • In an active/active pool, make one backend unready, open fresh connections, and confirm selection of the surviving instances. Test existing sessions separately.
  • Restore the backend and confirm readiness before it receives new work; verify scale-out and planned scale-in behavior where used.
  • For WSFC, perform a controlled role move, confirm the old owner stops answering the dedicated probe, and prove that a new client session reaches the new owner through the same service name. Inspect cluster events and execute a real SQL query.
  • Exercise the zone, appliance, or regional failure relevant to the selected use case. Include data dependencies and remaining capacity, then compare measured recovery with the service objective.
  • Verify egress source IPs and SNAT capacity under representative load when outbound connectivity is configured.
  • Restore test changes through the supported deployment mechanism, confirm normal traffic and alerts, and retain evidence for the next review.