Standalone Tomcat 6.0. * + 20,000 concurrent connections

Does anyone know how to configure Tomcat 6.0 as a standalone web server (on Windows XP) that can handle 20,000 concurrent connections? Please help me.

+3
source share
1 answer

If you configure him to use the HTTP NIO connector and bring him enough memory, he should theoretically do this.

With a regular HTTP connector, performance will start to slow down around 1K connections, and then about 5K concurrent connections will plummet, simply because each connection implicitly uses its own stream. The HTTP NIO connector has a single stream that scales much, much better.

Basically all you have to do is replace the default HTTP connector protocol attribute HTTP/1.1 with org.apache.coyote.http11.Http11NioProtocol :

 <Connector protocol="org.apache.coyote.http11.Http11NioProtocol" port="80" redirectPort="8443" connectionTimeout="20000" compression="on" /> 

And give him enough memory. With 20K connectors, start with 2 GB. You can install it in Tomcat systray tool.

This, however, is an edge that also depends on the equipment used. If the CPU and I / O drive become very high, I would recommend hosting a second Tomcat server and cluster servers.

+6
source

Source: https://habr.com/ru/post/1446608/


All Articles