Scalingwrr

Weighted round robin

Definition

Weighted round robin cycles through servers like round robin, but a server with weight w receives w requests for every one received by a server with weight 1.

In practice

It lets a pool mix machine sizes: a 16-core server can take twice the traffic of an 8-core one. Weights are also a simple way to send a small share of traffic to a canary release.

Weights are static, so they drift from reality when a server degrades or request costs change. Smooth implementations interleave choices (A, B, A, C, A) rather than sending bursts to the heaviest server.

Example

Servers with weights 3, 1 and 1 receive 60%, 20% and 20% of requests respectively.