Load balancer

A load balancer sits in front of a group of servers and distributes incoming requests across them, so no single machine is overwhelmed and one failure doesn't take the service down. In the cloud it's a managed service, AWS ALB/ELB, Azure Load Balancer, Google Cloud Load Balancing, and the anchor for autoscaling and zero-downtime cutovers.

A load balancer sits in front of a group of servers and distributes incoming requests across them. That buys you two things at once: more traffic than any single server could carry, and a service that stays up when one server fails or gets pulled for maintenance. In the cloud it’s a managed service, AWS ALB/ELB, Azure Load Balancer, Google Cloud Load Balancing, not a box you run.

In plain terms

It’s the person at the front of the bank queue directing each customer to whichever teller is free. The load balancer health-checks every server behind it and routes each new request to one that’s up and responsive; when a teller steps away, it simply stops sending people there, and customers never notice. Because it’s the one stable address in front of a changing fleet, it also becomes the natural place to terminate TLS and the fixed point your DNS name lives at.

Why it matters when you migrate

  • It’s what makes autoscaling invisible. New instances register as they launch and deregister as they terminate; capacity follows demand and users only ever see the one address.
  • It’s the lever for zero-downtime cutovers. Shifting traffic gradually from old to new, the core of a blue-green migration, happens at the load balancer.
  • Front servers in more than one zone. A load balancer across multiple availability zones is the standard pattern for surviving a data-centre outage; a load balancer in front of a single AZ only pretends to.