Một load balancer phân tán lưu lượng đến trên một nhóm server backend để không server nào bị quá tải và hệ thống vẫn khả dụng nếu một server chết. Phân biệt cốt lõi là tầng nó hoạt động:
L4 (Transport) L7 (Application)
routes by IP + port only reads HTTP: path, headers, cookies, host
┌──────────────┐ ┌──────────────┐
│ balancer │──▶ server A │ balancer │ /api/* ──▶ API pool
│ (TCP/UDP) │──▶ server B │ (HTTP-aware) │ /img/* ──▶ static pool
└──────────────┘──▶ server C └──────────────┘ cookie=X ──▶ sticky backend
fast, opaque, protocol-agnostic smart routing, TLS termination, can inspect
