Limit each method of com.foo.BarService
to no more than 10 concurrent server-side executions (or take up thread pool threads):
<dubbo:service interface="com.foo.BarService" executes="10" />
Limit the sayHello
method of com.foo.BarService
to no more than 10 concurrent server-side executions(or take up thread pool threads):
<dubbo:service interface="com.foo.BarService">
<dubbo:method name="sayHello" executes="10" />
</dubbo:service>
com.foo.BarService
to no more than 10 concurrent client-side executions (or take up thread pool threads):<dubbo:service interface="com.foo.BarService" actives="10" />
OR
<dubbo:reference interface="com.foo.BarService" actives="10" />
sayHello
method of com.foo.BarService
to no more than 10 concurrent client-side executions(or take up thread pool threads):<dubbo:service interface="com.foo.BarService">
<dubbo:method name="sayHello" actives="10" />
</dubbo:service>
OR
<dubbo:reference interface="com.foo.BarService">
<dubbo:method name="sayHello" actives="10" />
</dubbo:service>
If <dubbo:service>
and <dubbo:reference>
are both configured with actives
,<dubbo:reference>
is preferred.Ref to:Configuration coverage strategy.
You can config the loadbalance
attribute with leastactive
at server-side or client-side,then the framework will make consumer call the minimum number of concurrent one.
<dubbo:reference interface="com.foo.BarService" loadbalance="leastactive" />
OR
<dubbo:service interface="com.foo.BarService" loadbalance="leastactive" />
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.