3 ms·
Over many requests, both should average to N requests served to each instance assuming a uniform random distribution. The real issue is being able to figure ou
by mononcqc 14y ago
Over many requests, both should average to N requests served to each instance assuming a uniform random distribution.
The real issue is being able to figure out instances to avoid when some requests end up being slow. To put it another way, ideal balancing in this case isn't about evenly splitting all requests, but evenly splitting all processing (or waiting) time.
If you can guarantee that requests tend to take pretty stable and uniform time, then random or round-robin distribution should give good results. If you can't, some requests will be stuck waiting behind others and their waiting time will accumulate. You'll see worse behaviour when two or more of the bad slow requests get queued one after the other.