- Core:
- Full documentation:
- Deployer:
-
Extras:
- JMX Remote jar (pgp, md5)
- Web services jar (pgp, md5)
- JULI adapters jar (pgp, md5)
- JULI log4j jar (pgp, md5)
How? Share your insights, use cases, comments and questions on best practices for deploying, managing and operating Apache Tomcat in the Enterprise.
In prior entries, we’ve discussed Commercial JEE Application Server Support, the reasons this support is so costly, and began discussions focusing on the support differences between Tomcat and commercial JEE Application Servers. Now we’ll explore the three general types of Tomcat support that are available and dig into the most common choice, Community Support.
Tomcat users have three options available for support:
SpringSource tc Server provides enterprise users with the lightweight java app server they want along with the streamlined configuration, advanced performance monitoring, and professional support businesses need. Built as a drop-in replacement for Apache Tomcat, tc Server will instantly upgrade your custom-built and commercial software applications to Enterprise Tomcat.
Download your free trial, and try it today! Learn More »
Demo DownloadThe short answer is that this is a myth. The longer answer is that back in the days of Tomcat 3 there was some truth to this depending on circumstances. However, for the versions of Tomcat in use today (5.5.x and 6.0.x) then there is no need to use httpd for purely performance reasons. Tomcat now supports the native/APR connector which uses the same native library (the Apache Portable Runtime—APR) as httpd for the low-level I/O and therefore can achieve similar performance to httpd. When serving static content there is ever so slightly more overhead when using Tomcat compared to httpd but the differences are so small they are unlikely to be noticeable in production systems.
If you research the httpd vs Tomcat performance issue, you will find a variety of load and performance benchmarks that show a range of results. An often quoted result shows that Tomcat's pure Java connector is consistently faster than httpd.
This particular result is the opposite of what is expected. httpd should be significantly faster than Tomcat's pure Java connector. This result is probably caused by the size of the file used. Tomcat caches small static files in memory by default and this will provide a significant performance improvement. httpd does not cache files in memory by default. This demonstrates quite nicely how the definition of the benchmark can have a significant impact on the results.
The major JEE Application Server vendors offer sophisticated, feature rich, products sold under vendor licenses, together with providing annual maintenance support agreements. While it may not be strictly mandatory (salesmen often tell the customer that it is…commissions on support are very high) for the customer to purchase a support agreement, virtually 100% of the customers do. Since these products are based on proprietary closed source software technology, only those with access to the vendor’s source code can provide maintenance or enhancements to the product. Given the choice of forgoing support, patches, and upgrades, or of paying for the vendor’s maintenance agreement, customers pay, and pay, and pay.
There are third parties providing consulting services and training, but anything involving the internals of the Application Server is inaccessible. Hardly surprisingly, software vendors use this leverage to their best advantage, making maintenance the most profitable portion of their businesses.
The JEE Application Server vendors offer multiple levels of products with software Iicense list pricing/CPU varying from just under $5,000 to over $25,000. It is also common for these list prices to be heavily discounted during the purchase negotiations, particularly for large volume customers. Additionally, many major customers enter into Enterprise License Agreements (ELA) which provides them even more advantageous bulk pricing.
One area that is getting a lot of attention in these days of "do more with less" is the cost of infrastructure maintenance. Many studies show that maintaining software is much more expensive over it's life cycle than purchasing/building it in the first place, so IT management is looking at these costs with renewed interest. The issue turns out to be a bit more complex than it originally appears, although one thing that leaps out is that all of the options for supporting Tomcat are far better than the options we all had with commercial JEE Application Servers. First, let's look at what we mean by "support". In this series of blogs, I'll be sharing some thoughts about the various supportions available for Tomcat, as well as contrasting those with the JEE commercial Application Server support situation.
While it is theoretically possible to forgo support entirely, and sometimes this is forced by software vendor failure or acquisition/product retirement, realistically IT organizations require ongoing support for their mission critical infrastructure. In this post, we will be discussing the various options available to IT organizations for supporting Tomcat environments. We will also be discussing the important differences between commercial proprietary closed source vendor JEE application server support and Apache Tomcat.
One of the most important and valuable “features” of Tomcat from the IT Operations point of view is support choice. Proprietary software can only be supported by the vendor, at that vendor’s monopolistic support pricing, while using Tomcat provides multiple viable options in a competitive support environment. Hardly surprisingly, excellent Tomcat support can therefore be obtained at much lower cost. That said, while Tomcat itself is “free”, there are real internal and external costs associated with using Tomcat as an IT infrastructure. It is important to understand these costs when comparing the various support options.
Tomcat has long been blamed for causing memory leaks in the permanent generation (PermGen) that lead to OutOfMemoryErrors when re-loading web applications. I was discussing this at the eJUG days conference last year when I made an off-the-cuff remark that these errors were nearly always application bugs rather then Tomcat bugs. This generated a fair amount of debate that ended up with me doing some impromtu debugging of a couple of web applications provided by the audience.
The result of the debugging was that we found a number of root causes for the memory leaks that were fairly evenly split between application code, library code and JVM code. As I was coding some fixes for these issues, I realised that Tomcat could prevent a number of these memory leaks and detect even more. Not only that, in a number of cases it looked to be possible for Tomcat to actually fix the memory leak when it detected it. This lead, ultimately, to the new memory leak prevention and detection in Tomcat 6.
There are two parts to the new memory leak features. The first part handles memory leak prevention and is implemented as a life-cycle listener, the JreMemoryLeakPreventionListener. This listener prevents memory leaks by calling various parts of the Java API that are known to retain a reference to the current context class loader. If a web application is the first code to call one of these standard Java APIs, the web application class loader will be pinned in memory which will cause a memory leak. By making sure that Tomcat code makes the calls first, the memory leaks are prevented. If you want to know the gritty details of what this listener actually does, the source code is pretty well commented.
Popular Links