RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


Real-Time Tracking and Tuning for Busy Tomcat Servers

Learn a technique for configuring your Tomcat servers to handle heavy traffic while determining how appropriate your current configuration is for changing load demands.

pache Tomcat enjoys the reputation of being a small but very formidable servlet container capable of handling heavy production loads. Its most common role probably is as the application server for lightweight J2EE applications (servlets, plain old Java objects, and no EJBs). In such a role, it often handles significant production loads, for which these types of lightweight applications are best suited.

Tomcat's default installation, though, is configured to handle medium loads. Running an application on Tomcat in high-load environments requires further tuning. I recently worked on a project that presented this exact problem. We had to configure Tomcat servers to handle significant traffic (maximum sustained load was 1,450 requests per second generated by 150 or more unique, concurrent visitors, divided across 2–4 servers) and determine how appropriate Tomcat's configuration is for changing load demands such as traffic spikes and continuously increasing loads.

The key finding we discovered was that the configuration and size of Tomcat's resource pools had a significant effect on the overall scalability and performance of the server. Tomcat with properly configured resource pools is capable of handling heavy Web traffic with sustained performance. However, how do you know exactly what the appropriate size of these resource pools would be, as well as how to track their usage in real time? A pool that is too small obviously would be a bottleneck that directly affects the end user experience. A pool that is too large would consume vital system resources such as CPU and/or memory and potentially threaten the stability of the platform.

While trying to determine those crucial parameters and ratios, I developed an approach that helped us not only track and understand the most appropriate server capacity-related settings but also open the door to other similar real-time tracking and monitoring approaches. This article reviews the merits of my proposed technique and discusses the exact steps for implementing something similar in your applications.

Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date