What is the benefit (if any) of using APR with Tomcat?

Marko picture Marko · Apr 15, 2009 · Viewed 7.3k times · Source

Tomcat has an option to use APR for handling connections. What are the benefits of using that? Does anyone have firsthand experience with it?

Answer

Brian Agnew picture Brian Agnew · Apr 15, 2009

Does this answer yor question re. benefits?

Tomcat can use the Apache Portable Runtime to provide superior scalability, performance, and better integration with native server technologies. The Apache Portable Runtime is a highly portable library that is at the heart of Apache HTTP Server 2.x. APR has many uses, including access to advanced IO functionality (such as sendfile, epoll and OpenSSL), OS level functionality (random number generation, system status, etc), and native process handling (shared memory, NT pipes and Unix sockets).

These features allows making Tomcat a general purpose webserver, will enable much better integration with other native web technologies, and overall make Java much more viable as a full fledged webserver platform rather than simply a backend focused technology.

(my emphasis)