如题,不太明白tomcat配置成NIO具体的作用体现在哪方面,配置如下:
<Connector port="8082" protocol="org.apache.coyote.http11.Http11NioProtocol"
希望各路大神能赐教下。
Tomcat8 官方文档中的比较如下:
Java Blocking Connector BIO | Java Nio Connector NIO | Java Nio2 Connector NIO2 | APR/native Connector APR | |
---|---|---|---|---|
Classname | Http11Protocol | Http11NioProtocol | Http11Nio2Protocol | Http11AprProtocol |
Tomcat Version | 3.x onwards | 6.x onwards | 8.x onwards | 5.5.x onwards |
Support Polling | NO | YES | YES | YES |
Polling Size | N/A | maxConnections | maxConnections | maxConnections |
Read Request Headers | Blocking | Non Blocking | Non Blocking | Blocking |
Read Request Body | Blocking | Blocking | Blocking | Blocking |
Write Response Headers and Body | Blocking | Blocking | Blocking | Blocking |
Wait for next Request | Blocking | Non Blocking | Non Blocking | Non Blocking |
SSL Support | Java SSL | Java SSL | Java SSL | OpenSSL |
SSL Handshake | Blocking | Non blocking | Non blocking | Blocking |
Max Connections | maxConnections | maxConnections | maxConnections | maxConnections |
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。