wpcchengxuyuan opened a new issue #1181: 关于service comb文档上的一些疑问和实际运用中的不符点
URL: https://github.com/apache/servicecomb-java-chassis/issues/1181
 
 
   因为最近在做一些网关性能对比,所以对service comb做了一个详细的测评,以下是个人的疑惑,望您解答。
   1.负载均衡部分关于服务端配置tag的疑问。
   
文档是![image](https://user-images.githubusercontent.com/18682598/56103780-15970600-5f67-11e9-996c-70a3651f7666.png)
   而实际代码中写死为
   
![image](https://user-images.githubusercontent.com/18682598/56104038-72df8700-5f68-11e9-8208-4e53b9b7fa5b.png)。
   2.关于transport-rest连接数问题,文档中给出为client.thread-count*client.maxPoolsize的乘积。
   
![image](https://user-images.githubusercontent.com/18682598/56104929-707f2c00-5f6c-11e9-9329-74e9aa394dc9.png)
   
我在实际操作过程中发现,如果server.thread-count>client.thread-count的乘积,则连接数为前者。因为是用ab压测工具采用1000并发直接压测网关服务,后端部署4个服务,所以应该能达到文档说的极限连接,然而后端服务连接数如图
   
![image](https://user-images.githubusercontent.com/18682598/56104964-a3c1bb00-5f6c-11e9-9bbf-5bf54b4cdfdf.png)。有一条是本身服务的监听连接,则有45条和网关的连接。
   网关配置如图
   
![image](https://user-images.githubusercontent.com/18682598/56105004-dbc8fe00-5f6c-11e9-8551-b1885e40ab7d.png)。client.thread-count*maxPoolSize=24,server.thread-count*maxPoolSize=45。显然和文档不符,我猜测是由于服务本身又作为客户端又作为服务端,而通讯采用长连,连接需要复用,因此选用最大的。这只是猜测,望您指点疑惑。
   3.关于transport-rest网络线程数问题,文档指出为
   
![image](https://user-images.githubusercontent.com/18682598/56105276-ff407880-5f6d-11e9-8c81-5373846a092c.png),应该就是核数*2,机器核数为40
   
![image](https://user-images.githubusercontent.com/18682598/56105318-33b43480-5f6e-11e9-8514-9eb7e51a09a6.png),然而jstack将eventloop统计之后发现不为这个数字
   
![image](https://user-images.githubusercontent.com/18682598/56105371-7118c200-5f6e-11e9-9135-cf8be382f3e7.png)。然后也仔细的查看了jstack,除了eventloop没有其他的网络线程名称例如nio之类的。查看源码只发现服务作为server端时有一个accept线程,workEventLoop是通过addWork操作动态添加的。文档对于这部分貌似也不是正确的描述,希望您大致的指导解释一下。
   
   
   
   
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to