Load balancing variable-cost requests
Your task
Design the load-balancing policy for a stateless API tier of ~80 servers where requests have highly variable cost (some calls take 2ms, some take 2s) and servers occasionally degrade (GC pauses, a slow disk) without fully failing. Round-robin currently sends traffic to limping servers and overloads them with expensive requests. Design the balancing algorithm, health checking, and how you detect and eject a 'gray-failing' server.
It covers
- Health checks
- Outlier detection
- Least connections