Design: Load Balancer with Round Robin and Least Connections Algorithms
Design focuses on the load balancer component and its algorithms. Backend server internals and client implementations are out of scope.
Functional Requirements
FR1: Distribute incoming client requests evenly across multiple backend servers
FR2: Support at least two load balancing algorithms: round robin and least connections
FR3: Handle up to 10,000 concurrent client connections
FR4: Provide low latency routing with p99 response time under 100ms
FR5: Ensure high availability with 99.9% uptime
FR6: Allow dynamic switching between load balancing algorithms without downtime
Non-Functional Requirements
NFR1: System must handle sudden spikes in traffic gracefully
NFR2: Load balancer should not become a single point of failure
NFR3: Minimal overhead in decision making to keep latency low
NFR4: Backend servers may have different capacities (heterogeneous environment)