Class RandomLoadBalance
java.lang.Object
org.apache.dubbo.rpc.cluster.loadbalance.AbstractLoadBalance
org.apache.dubbo.rpc.cluster.loadbalance.RandomLoadBalance
- All Implemented Interfaces:
LoadBalance
This class select one provider from multiple providers randomly.
You can define weights for each provider:
If the weights are all the same then it will use random.nextInt(number of invokers).
If the weights are different then it will use random.nextInt(w1 + w2 + ... + wn)
Note that if the performance of the machine is better than others, you can set a larger weight.
If the performance is not so good, you can set a smaller weight.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.dubbo.rpc.cluster.loadbalance.AbstractLoadBalance
select
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
RandomLoadBalance
public RandomLoadBalance()
-