Tomcat的接受计数 [英] Tomcat's accept count

查看:34
本文介绍了Tomcat的接受计数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 Tomcat 的 acceptCount 有以下疑问.
它说:

I have the following question on Tomcat's acceptCount.
It says:

当所有传入连接请求的最大队列长度可能的请求处理线程正在使用中.收到的任何请求当队列已满时将被拒绝.默认值为 10.

The maximum queue length for incoming connection requests when all possible request processing threads are in use. Any requests received when the queue is full will be refused. The default value is 10.

我不确定这是如何工作的.我的意思是我知道有一个单独的 TCP 队列来确定可以有多少连接,所以如果我将 acceptCount 放在应用程序级别,例如30000,有什么区别吗?
我的意思是这个配置似乎没有用.

I am not sure how this works. I mean I know that there is a separate TCP queue that determines how many connections can come so if I put acceptCount in application level e.g. 30000, does it make any difference?
I mean it seems that this configuration is not useful.

我说得对吗?

推荐答案

这是对 ServerSocket 的构造函数.这个想法是操作系统可以保留传入的连接,即使它们不能被立即处理.只有在您遇到突发流量和快速处理时间时才有用.

This is a direct pass-through to the backlog parameter of ServerSocket's constructor. The idea is that the OS can hold onto incoming connections even if they can't be processed right away. It's only useful if you have bursty traffic and fast processing times.

这篇关于Tomcat的接受计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆