【问题标题】:On Standalone Tomcat server how much higher value - maxThreads and maxConnections can be set?在独立 Tomcat 服务器上,可以设置多少更高的值 - maxThreads 和 maxConnections?
【发布时间】:2016-04-06 06:06:39
【问题描述】:

我正在使用 tomcat 服务器进行 web 服务,发现两个属性 maxThreads 和 maxConnections 定义如下: https://tomcat.apache.org/tomcat-7.0-doc/config/http.html

现在,在这里提出一点,假设我有 10 个 CPU 和 10G RAM 的服务器,那么可以从 UI 触发多少并发连接。我将如何决定单个 tomcat 集群的 maxThreads 和 maxConnections 的最大值是多少?

【问题讨论】:

    标签: java apache tomcat webserver tomcat7


    【解决方案1】:

    这取决于您的 Tomcat 是处于 NIO(更多连接,更少线程)还是 BIO(一个连接线程 - 这是 Tomcat 7 中的默认设置)模式。

    假设在默认模式下,您可以尝试将 maxThread 属性设置为 500-700,将 maxConnection 设置为 10000。

    【讨论】:

    • 假设我的设计支持 BIO ,那么根据我的服务器大小,建议的数字是多少?将 maxThread 属性设置为 500-700,将 maxConnection 设置为 10000。看起来不可行。
    猜你喜欢
    • 2014-08-31
    • 1970-01-01
    • 1970-01-01
    • 2015-11-26
    • 2016-03-08
    • 1970-01-01
    • 1970-01-01
    • 2011-06-26
    • 1970-01-01
    相关资源
    最近更新 更多