Class LeastLoadedClientRoutingStrategy
java.lang.Object
com.linkedin.venice.fastclient.meta.AbstractClientRoutingStrategy
com.linkedin.venice.fastclient.meta.LeastLoadedClientRoutingStrategy
- All Implemented Interfaces:
ClientRoutingStrategy
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
ConstructorDescriptionLeastLoadedClientRoutingStrategy
(InstanceHealthMonitor instanceHealthMonitor) -
Method Summary
Modifier and TypeMethodDescriptiongetReplicas
(long ignored, List<String> replicas, int requiredReplicaCount) Methods inherited from class com.linkedin.venice.fastclient.meta.AbstractClientRoutingStrategy
updateHelixGroupInfo
-
Constructor Details
-
LeastLoadedClientRoutingStrategy
-
-
Method Details
-
getReplicas
- Specified by:
getReplicas
in interfaceClientRoutingStrategy
- Overrides:
getReplicas
in classAbstractClientRoutingStrategy
-