Limit server-side accept to no more than 10 connections
<dubbo:provider protocol="dubbo" accepts="10" />
OR
<dubbo:protocol name="dubbo" accepts="10" />
Limit client-side creating connection to no more than 10 connections for interface com.foo.BarService
.
<dubbo:reference interface="com.foo.BarService" connections="10" />
OR
<dubbo:service interface="com.foo.BarService" connections="10" />
If used default protocol(dubbo
protocol), and the value of connections
attribute is great than 0,then each service reference will has itself connection,else all service which belong to same remote server will share only one connection. In this framework,we called private
connection or share
connection.
If <dubbo:service>
and <dubbo:reference>
are both configured accepts/connections,<dubbo:reference>
is preferred, refer to Configuration coverage strategy.
Because connection is connect on Server, so configure on provider side.