-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Jakub,
On 5/23/16 8:03 PM, Ja kub wrote: > Christopher, Thx for response, pleas confirm or deny if I > understand well. > > BIO uses thread per http connection (tcp connection). (Shame I > didn't realize it!) NIO uses thread per request. It's more complicated than that, but very close. > With NIO thread is returned to pool as soon as request is finished > (doGet ends). Yes. > With BIO thread is returned to pool only when tcp connection is > closed !!! Yes, but even HTTP keepalive has a timeout, and the connection will be dropped after that timeout, releasing the thread. > Given http://kb.mozillazine.org/Network.http.keep-alive.timeout - > Amount of time in seconds to keep keep-alive connections alive. > Default: 115 seconds. default tomcat keepAliveTimeout 60 s default > tomcat maxThreads is 200 With 200 browsers with ajax pooling server > every 50 seconds tomcat connector thread pool will be depleted and > client no 201 will not be able to connect to tomcat ? Yes. > So with default configuration tomcat 7 will have problem with just > 201 on-line clients of an ajax application (with only 4 > requests/second) ? If the browse doesn't close those HTTP connections from the Ajax clients, the yes, you can trivially DOS your server. > Why is BIO connector still default one in tomcat 7 server.xml? Because it was the default when Tomcat 7 shipped and changing defaults that are that important is a big deal. You are welcome to change it yourself. > Is there any problem with backward compatibility (don't think so, > cause than BIO wouldn't be totally removed in 8.5, but left > available ) ? BIO is 100% gone in Tomcat 8.5. The protocol (HTTP) and the API (servlet) are still identical, so there should be no problems for your application in general. - -chris -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJXQ71tAAoJEBzwKT+lPKRYZHIP/jbN3vhtHkLHny6kNXguh5Pl BpwaRNHojlOqzXQUWidrmQpQPZ+8GKSUcJp3hcwCklRYNqLS9GdENodwYJFhyKRE jVFG2KRSVI+difWKpuX+gIVEiFxUV/fQ+1ZhrNUXusElprqku+s15dqsgI5GYu3u BlvEUVs5/rYG+KqZFCYXw5lpe/pRd3fs+zNJFKOXYqY2qQRICzXQJDCvICgPp7fZ I804dDIR8mhOfffemgaB1OyOy4F3NsPodBA2LsVcbJpecfQy3vWPCSNkLmUT1Nee a30Q6VjdMsq+w/C1cGnxxDwxqoK8mXnyUEIH8GmtGyiak4lzJzSXmqO3RjqXHwm8 tJnJdWNK+lP4EY9dJQrzv4NokZN+rYb9WCogMXKHvTdpmWDzMiMQs3zyFPkbLfKw EGeZKaY3zJFIGltPvpk/QRj0+VcXh6x3g9TUtR8ypoETrchAszCJPVUYy8H5yBaX N3H9wrJ2OlFmjrXKNRsY1OtuTABiKjVZXtfuTIgyK4tSddM+4gme5iydmURRISMY 7G1UQRNtLng8WFpCaIPrrBVUgXXrfkmYu9pEyjgzuMNc1/gf5stQNWH/AagOVt+J WR2Nz4nCSjsMDCyo3+AW6pcesp7aPOJ/uAsNAZHJbZvE2mTxsw857jZxonTF1bVN V7EDZv5G8d/FFtZuzVzf =UEDx -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org