The probability of collisions on one section is high, but the larger the amount of calls, the more uniform the distribution. And when use weight based on probability the distribution turns out to be uniform, which also helps to dynamically adjust the provider weights.
RoundRobin LoadBalance
RoundRobin, use the weight’s common advisor to determine round robin ratio.
Traffic flow to slower providers may cause requests piled up, e.g., if there’s a provider processing requests in a very slow speed, but it’s still alive, which means it can receive request as normal. According to RoundRobin policy, consumers will continuously send requests to this provider on predetermined pace, have no aware of the provider’s bad status. Finally, we will get many requests stuck on this unhealthy provider.
LeastActive LoadBalance
LeastActive, a random mechanism based on actives, actives means the num of requests a consumer have sent but not return yet。
Slower providers will receive fewer requests, cause slower provider have higher actives.
ConsistentHash LoadBalance
ConsistentHash, the same parameters of the request is always sent to the same provider.
When a provider fails, the original request to the provider, based on the virtual node algorithm, averages to other providers, does not cause drastic changes.