Tomcat Thread Pool Options: A Production Decision Guide
Choose between Tomcat’s default connector, custom Executor, NIO, and HTTP/2 based on traffic patterns, then validate with thread dumps.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Choose between Tomcat’s default connector, custom Executor, NIO, and HTTP/2 based on traffic patterns, then validate with thread dumps.
Configure Tomcat's JNDI Realm for container-managed LDAP authentication, map roles in web.xml, and verify the flow without changing application code.
Tomcat's Servlet 3.0 async support lets you free connector threads during blocking I/O. Learn how to configure asyncTimeout and structure a correct AsyncContext example.
Learn to diagnose Tomcat 9 and 10 HTTP connector thread exhaustion and accept-queue saturation using thread dumps, JMX metrics, and log analysis before changing maxThreads or acceptCount.
When Tomcat repeatedly throws Metaspace/PermGen errors after redeploys, a classloader leak is usually the culprit. This guide walks through checking thread dumps, JVM histograms, and library placement to pinpoint and fix the leak, with practical commands and verification steps.
Learn how to choose between HTTP/1.1 and HTTP/2 in Apache Tomcat, comparing NIO and NIO2 connectors to optimize latency and memory usage in production.
HTTP/1.1 forces browsers to open multiple TCP connections and suffer head-of-line blocking. Tomcat's NIO2 connector can multiplex HTTP/2 streams over one TLS connection—if you configure it correctly.
Enable HTTP/2 in Apache Tomcat using the Http2Protocol connector, TLS, and Java 11+, then verify with curl and browser DevTools.
When Tomcat sits behind a reverse proxy, request.getRemoteAddr() returns the proxy IP. RemoteIpValve recovers the real client address—if you configure the trust boundaries correctly.