Architecting for High Concurrency with the Tomcat NIO Connector
Learn how to use the Tomcat NIO Connector to prevent thread exhaustion and manage thousands of concurrent keep-alive connections without crashing your JVM.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how to use the Tomcat NIO Connector to prevent thread exhaustion and manage thousands of concurrent keep-alive connections without crashing your JVM.
Learn how to size Tomcat’s NIO connector thread pool, accept queue, and keep‑alive timeout to stop connection refusals under load while keeping memory usage predictable.
Stop crashing your JVM with too many threads. Learn how to tune Tomcat's NIO connector by balancing maxConnections and maxThreads for high-concurrency traffic.
Requests hang while CPU idles? That's Tomcat's Connector thread pool exhausted, usually by threads blocked downstream. A diagnostic path from thread dumps to the right fix.
When Tomcat reports “Failed to accept HTTP/2 connection: ALPN not available” or clients cannot upgrade, this guide walks through common causes, checks, and fixes to get HTTP/2 working on Tomcat 9+.
Learn how to configure a shared Tomcat thread pool to cut memory waste and simplify tuning across HTTP and AJP connectors.
A decision guide for picking a JDBC connection pool in Tomcat: comparing the built-in Tomcat JDBC Pool, HikariCP, and DBCP2 with concrete JNDI configurations and validation steps.
Tomcat behind a load balancer logs the proxy's IP, not the visitor's. RemoteIpValve restores the real client address from X-Forwarded-For and the scheme from X-Forwarded-Proto — if you configure the trust regex and valve ordering correctly.
A decision guide for selecting Tomcat connector protocols (HTTP/1.1, HTTP/2, AJP) based on deployment topology, performance needs, and reverse-proxy architecture. Covers Tomcat 9.0.x and 10.1.x LTS with concrete configurations and validation steps.