Tomcat 5.5.23 document read tips 12-APR and tomcat

Source: Internet
Author: User
This article describes APR (APACHE portal runtime) and tomcat.

1. Apr comes from the Apache project and is a core module in Apache 2.x. Using APR in Tomcat can greatly improve performance and improve scalability. Because ARP uses many native methods, such as sendfile (using sendfile allows users to download large files) and epoll (in Linux ). Here is the original description:

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 passed 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 ).

2. Configure APR in Tomcat. in Linux, manually compile the tomcat-native.tar.gz package in the $ catalina_home/bindirectory. Compiling this package is very simple. You can use configure, make, and make install. However, when compiling this package, you must first install the following:

    APR 1.2 + Development headers (libapr1-dev package)
    OpenSSL 0.9.7 + Development headers (libssl-dev package)
    JNI headers from Java compatible JDK 1.4 +
    GNU Development Environment (GCC, make)



I have no labs here. If necessary, I can come back to experiment with this Apr.

3. after the above packages are compiled, some libraries will be generated. If these libraries can be found by Tomcat Connector (if Tomcat cannot be found, the path to the library will be printed ), the connector automatically becomes the connector of APR enable to provide high performance. The second half of this document is about some additional configurations in ctor after APR enable. If you are interested, please refer to this document directly, including the additional configurations of SSL ctor in Apr.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.