dubbo 并发控制 和 连接控制

news/2024/7/7 21:05:33
  • 并发控制

(1)服务端并发执行(或占用线程池线程数)不能超过10个。

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


(2)限制到方法

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

<dubbo:method name="sayHello" executes="10" />

</dubbo:service>

(3)占用连接的请求的数不能超过10个

 

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


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

Load Balance:

配置服务的客户端的loadbalance属性为leastactive,此loadbalance会调用并发数最小的provider.

<dubbo:reference interface="com.foo.BarService" loadbalance="leastactive" />

 

  • 连接控制

(1)如果是长连接,比如Dubbo协议,connections表示该服务对每个提供者建立的长连接。

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

 

最后欢迎大家访问我的个人网站:1024s


http://www.niftyadmin.cn/n/1275813.html

相关文章

运动APP软件开发具有什么好处?

人的身体健康离不开有效的运动&#xff0c;为了满足用户在运动方面的需求&#xff0c;健身运动 APP开发也开始出现&#xff0c;通过方便的手机平台为用户提供一条龙的运动服务。 运动APP软件开发具有什么好处&#xff1f; 对经营者来说&#xff1a; 降低用户管理的难度&…

linux下用户管理命令详细解释

linux下用户管理命令详细解释1.useradd,增加用户命令格式&#xff1a;useradd [选项] 用户名选项&#xff1a;-u 表示UID举例说明: useradd -u 888 user11-g 表示GID举例说明: useradd -g mysql user12-G 表示GID,GID,GID,...额外组即用户可以属于其他多个组举例说明: useradd …

Uncaught TypeError: Cannot read property 'msie' of undefined jQuery

这是因为$.brower方法从jQuery1.9以后已被移走。 如果有必要&#xff0c;使用jQuery Migrate plugin. 在你的jsp/js文件中&#xff0c;使用下面的脚本标签可心解决问题。 <script src"http://code.jquery.com/jquery-1.9.0.js"></script> <script s…

APP开发应该注意什么?如何切换模拟数据和真实数据?

当前社会环境下&#xff0c;每个人在选择 APP开发时&#xff0c;都希望能满足很多人的需求&#xff0c;实际上&#xff0c;当我们选择 APP开发时&#xff0c;可能最关心的就是到底该关注什么? APP开发应该注意什么&#xff1f;如何切换模拟数据和真实数据&#xff1f; 那么在…

基于centOS6.7搭建LAMP(httpd-2.4.18+mysql-5.5.47+php-5.6.16)环境

首先确保系统可以联网。设置IP地址以及虚拟机安装linux在此略过。本文采用centos6.7 64位minimal版、php5.6.16、httpd-2.4.18、mysql-5.5.47版搭建lamp环境。默认设置软件下载目录/usr/local/src&#xff0c;软件安装目录/app/local/下&#xff0c;安装顺序是apache→mysql→p…

Javascript use strict

ECMAscript 5添加了第二种支行模式&#xff1a;严格模式&#xff08;strict mode&#xff09;。 针对单个脚本 <script>"use strict";console.log("这是严格模式。");</script> 针对单个函数 function strict(){"use strict";retur…

APP测试流程分析

1.代码 通常用来进行内存测试的版本是纯净版本&#xff0c;不应该附加多余的Log和调试用组件。例如有些情况下&#xff0c;为了测试界面延迟/函数执行时间等性能&#xff0c;会加入一些桩点代码。在内存测试中这些代码是不必要的&#xff0c;它们可能会分配临时内存&#xff0…

Dissecting the Disruptor: Why it’s so fast (part one) – Locks Are Bad

原文地址&#xff1a;http://mechanitis.blogspot.com/2011/07/dissecting-disruptor-why-its-so-fast.html&#xff08;因前方有墙&#xff0c;所以我移到墙内&#xff09; Martin Fowler has written a really good article describing not only the Disruptor, but also how…