TOPIC NETWORKING
Load Balancers distributing traffic across servers to keep things fast and reliable
IN 10 SECONDS
A load balancer sits in front of a group of servers and distributes incoming requests across them using algorithms like round-robin, least connections, or IP hash. It also runs health checks — if a server goes down, traffic stops going to it. Cloud LBs (ALB, NLB, GLB) scale transparently and terminate TLS.
GOTCHA Load balancers are not a magic scalability wand. If every request triggers a 10-second DB query, adding more servers just means more slow requests in parallel. Fix the bottleneck first, then scale horizontally.
HOW A LOAD BALANCER ROUTES TRAFFIC
01 Client sends a request to the load balancer's DNS name or IP.
02 Load Balancer terminates TLS (if HTTPS), inspects the request, and picks a target based on its algorithm.
03 Health check the LB has already verified which targets are healthy via periodic HTTP or TCP checks.
04 Target server receives the request, processes it, and sends the response back through the LB.
05 Stickiness optional — if sessions need to persist, the LB sets a cookie to pin the client to the same target.
POKE IT YOURSELF
aws elbv2 describe-target-groups — list all target groups and health status
curl -I https://your-alb-dns.us-east-1.elb.amazonaws.com — inspect LB response headers
Drill this topic →
~80 sec read