Skip to content
← All components

Edge & networking

Load balancer

Spreads requests across healthy instances and terminates TLS.

When to use

  • In front of every horizontally scaled tier

Pitfalls

  • Sticky sessions hide state problems; keep services stateless
  • Long-lived WebSockets need L4 or connection-aware balancing

Options by provider

The first option is what diagrams show for that provider.

Amazon Web Services

  • Elastic Load Balancing (ALB/NLB)Managed

Google Cloud

  • Cloud Load BalancingManaged

Microsoft Azure

  • Azure Load BalancerManaged
  • Application Gateway — L7Managed

Open source / self-hosted

  • NGINXSelf-hosted
  • HAProxySelf-hosted
  • EnvoySelf-hosted

Related concepts

Used in