Skip to main content

Load Balancing Pattern

Learn Load Balancing Pattern (Core Microservices Patterns, Microservices Design Patterns) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

What is Load Balancing? When a service has multiple running instances (for scale and redundancy), Load Balancing decides WHICH instance handles each incoming request, spreading traffic evenly so no single instance is overwhelmed while others sit idle. Client-Side vs Server-Side Load Balancing • Server-Side - a dedicated load balancer (NGINX, AWS ELB, a Kubernetes Service) sits in front of the instances and routes each request; the caller doesn't know or care which instance handled it. • Client-Side - the calling service itself fetches the list of healthy instances (often from a service...

More lessons in Core Microservices Patterns