Class LeastLoadedClientRoutingStrategy
java.lang.Object
com.linkedin.venice.fastclient.meta.AbstractClientRoutingStrategy
com.linkedin.venice.fastclient.meta.LeastLoadedClientRoutingStrategy
This strategy is trying to route the request to the least-loaded instances.
1. If the weight of every instance is same, it will fall back to the round-robin fashion.
2. This strategy will skip any blocked instance.
3. When any selected instance is marked as unhealthy, this strategy will try to back-fill with the healthy instances,
and there are two purposes:
a. The latency shouldn't be affected since this strategy will still try to send request to the required healthy instances.
b. The unhealthy instance will still receive any requests, so we could mark it healthy once it is recovered.
-
Constructor Summary
ConstructorsConstructorDescriptionLeastLoadedClientRoutingStrategy
(InstanceHealthMonitor instanceHealthMonitor) -
Method Summary
Modifier and TypeMethodDescriptiongetReplicas
(long requestId, int groupId, List<String> replicas) Methods inherited from class com.linkedin.venice.fastclient.meta.AbstractClientRoutingStrategy
getHelixGroupId, trackRequest, updateHelixGroupInfo
-
Constructor Details
-
LeastLoadedClientRoutingStrategy
-
-
Method Details
-
getReplicas
- Overrides:
getReplicas
in classAbstractClientRoutingStrategy
-