Application Gateway / Load Balancer

Layer 7 (App Gateway) or layer 4 load balancing.

Problem it solves: A single server is a capacity ceiling and a single point of failure.

Where it sits: In front of a pool of stateless servers, typically one per tier.

When to use

  • More than one instance of a service.
  • Zero-downtime deploys and AZ failover.

When not to use

  • When a client-side load-balancing library already spreads load (service mesh).

Failure modes

  • An un-replicated LB is itself a SPOF.
  • Health checks that are too shallow route to broken instances.

Metrics to watch

  • Requests/s per backend
  • Healthy host count
  • 5xx rate
  • Connection count

Alternatives

  • DNS round robin
  • Service mesh / client-side LB

Configuration in Labs (illustrative defaults)

  • Instances (count) = 2 — Identical copies behind this logical component. Capacity scales linearly in this model.
  • Capacity per instance (req/s) = 200000 — Maximum requests one instance completes per second before it saturates.
  • Base service time (ms) = 1 — Processing time per request at zero load. Queueing adds to this as utilisation rises.
  • Health checks (0 / 1) = 1 — 1 = only route to healthy children (failover). 0 = keep sending a share to failed children.

Vendor examples (pattern only): Azure managed service. Simulated as a generic “Load balancer”.

In the guide