Load Balancing Patterns: Distributing Traffic Without Dropping Requests
Load balancers are invisible until they break. Then they’re the only thing anyone talks about. Here’s how to get them right. Algorithms That Matter Round Robin Requests go to each server in sequence: A, B, C, A, B, C… 1 2 3 4 5 upstream backend { server 10.0.0.1:8080; server 10.0.0.2:8080; server 10.0.0.3:8080; } Good for: Homogeneous servers, stateless apps Bad for: Servers with different capacities, long-running requests Weighted Round Robin Some servers get more traffic: ...