Sunday, February 4, 2007

The Best Servlet Container

I thought I could find any information about popular software in the Internet. I was wrong.

We have been using Tomcat for a long time. It is the most popular open source Java Servlet container. It is pretty simple to setup and maintain and it just works. Our applications size and usage has been growing steadily and about a year and half ago, we felt we were hitting limits in our webserver. We decided to switch to the best servlet container within our budget. We googled for days to find a performance comparison on servlet containers. Alas, water water everywhere, not a single drop to drink! There are a few broad comparisons on features supportes by the containers, but none with the information we were looking for, performance metrics.

So we did our own test. We setup identical boxes with Tomcat, WebLogic and Resin. We ran our application on them and used JMeter and httpunit to hit a representative page of each category of pages in our application. We wanted the test to tell us how the servers would perform in the real field, not in a behnchmark. So the number of concurrent connections and hits per second was what we expected to have in our production server.

Of the 3 servers, WebLogic was the priciest, we had an assumpiton that it would be the fastest one. We were in for a surprise. The fastest of the buch was none other than our poor Tomcat. It was consistently twice as fast as the slowest one in each category. WebLogic and Resin shared 2nd and 3rd places.

We stayed faithful to our beloved Tomcat. But the story did not finish there.