zoukankan      html  css  js  c++  java
  • tomcat7或以下协议模式修改为nio

    压测中将tomcat7以下的协议模式修改为nio。tomcat8已摒弃bio模式,tomcat7或以下默认是bio模式。

    Tomcat7必须修改Connector配置来启动:

      <Connector executor="tomcatThreadPool"
                   port="8781" protocol="org.apache.coyote.http11.Http11NioProtocol" 
                   connectionTimeout="20000" 
                   redirectPort="8443" />

    Tomcat启动的时候,可以通过log看到Connector使用的是哪一种运行模式:

    Starting ProtocolHandler [“http-bio-8080”]

    Starting ProtocolHandler [“http-nio-8080”]

    Starting ProtocolHandler [“http-apr-8080”]

    待试验:找一个是tomcat7部署的应用,测试同样的并发数,不同的协议模式bio和nio,进行测试对比。
  • 相关阅读:
    lldb
    错误记录
    越狱后
    c#学习
    26python类
    day01
    第二冲刺阶段第四天
    第二冲刺阶段第三天
    第五周课后作业
    结对作业
  • 原文地址:https://www.cnblogs.com/seamy/p/15648567.html
Copyright © 2011-2022 走看看