Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

4.1.2. Load Balancing Rules

Components:
Load Distribution Modes:
ModeHashUse Case
Default (5-tuple)Source IP, port, dest IP, port, protocolStateless apps
Source IP (2-tuple)Source IP, dest IPSession affinity
Source IP + protocol (3-tuple)Source IP, dest IP, protocolSame-client affinity
Health Probes:
ProtocolBest For
TCPSimple availability check
HTTP/HTTPSApplication-level health (checks specific path)

Probe settings:

  • Interval: How often to probe (seconds)
  • Unhealthy threshold: Failed probes before marking unhealthy
Inbound NAT Rules:

A load balancing rule spreads one frontend port across the whole backend pool. An inbound NAT rule does the opposite: it forwards a specific frontend port to a single backend instance, which is how you reach one particular VM through a load balancer that has no public IP of its own.

Load balancing ruleInbound NAT rule
DestinationThe whole backend poolOne backend instance
Typical useServing application trafficManagement access, such as RDP or SSH to one VM
Port mappingSame port on all membersA distinct frontend port per instance

The classic pattern is frontend port 50001 to VM1:3389 and 50002 to VM2:3389. Inbound NAT rules can also be defined against a backend pool so that port ranges are assigned to instances automatically, which is what scale sets use.

Outbound Rules (SNAT):

Standard Load Balancer provides explicit outbound SNAT configuration:

SettingPurpose
Frontend IPSource IP for outbound
Backend poolVMs using this rule
ProtocolTCP, UDP, or both
Allocated portsSNAT ports per instance
Idle timeoutHow long to keep connections

⚠️ Exam Trap: Without explicit outbound rules or NAT Gateway, Standard LB backends have NO outbound internet access. This is by design (secure by default).

See how it connects
Alvin Varughese
Written byAlvin Varughese
Founder•20 professional certifications