zoukankan      html  css  js  c++  java
  • 并发控制 executes

    一、控制服务端并发

    限制 com.foo.BarService 的每个方法,服务器端并发执行(或占用线程池线程数)不能超过 10 个:

    <dubbo:service interface="com.foo.BarService" executes="10" />

    二、控制服务端并发(方法级别)

    限制 com.foo.BarService 的 sayHello 方法,服务器端并发执行(或占用线程池线程数)不能超过 10 个:

    <dubbo:service interface="com.foo.BarService">
        <dubbo:method name="sayHello" executes="10" />
    </dubbo:service>

    三、控制客户端并发

    限制 com.foo.BarService 的每个方法,每客户端并发执行(或占用连接的请求数)不能超过 10 个:

    <dubbo:service interface="com.foo.BarService" actives="10" />

    <dubbo:reference interface="com.foo.BarService" actives="10" />

    四、控制客户端并发(方法级别)

    限制 com.foo.BarService 的 sayHello 方法,每客户端并发执行(或占用连接的请求数)不能超过 10 个:

    <dubbo:service interface="com.foo.BarService">
        <dubbo:method name="sayHello" actives="10" />
    </dubbo:service>

    <dubbo:reference interface="com.foo.BarService">
        <dubbo:method name="sayHello" actives="10" />
    </dubbo:service>

    如果 <dubbo:service> 和 <dubbo:reference> 都配了actives,<dubbo:reference> 优先

  • 相关阅读:
    avalon background-image写法
    eslint 规则
    性能优化 && 用户体验
    gif
    react 生命周期
    git reset
    js 正则表达式
    大小写问题
    python中的负数取模问题(一个大坑)
    python中的__init_subclass__是什么?
  • 原文地址:https://www.cnblogs.com/yifanSJ/p/9196719.html
Copyright © 2011-2022 走看看