Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
HydraExpress User Guide

3.4 Configuring Apache as an External Web Server

You may wish to use an external Web server with HydraExpress. You may use any Web server for this, but HydraExpress has some built-in support for using the Apache Web server in conjunction with the Apache Tomcat file mod_jk. This section describes using Apache with the AJP13 protocol. See the Apache Web server documentation for other advanced options such as using Apache to proxy HTTP requests.

3.4.1 Configuring the HydraExpress AJP 1.3 Connector

HydraExpress ships with a connector that accepts requests from an Apache Web server. This connector is configured in rwagent.xml located in your installdir\conf directory, with a default port of 8009. Here is a relevant excerpt from that file:

//1

Specifies the number of threads that should be spawned listening for new connections. Defaults to 1.

//2

The minimum number of threads to be created in the thread pool. Defaults to 5.

//3

The maximum number of threads to be created in the thread pool, in this case 20. Defaults to 10.

//4

The host property defines servers from which messages will be accepted; in this case, localhost only.

//5

The number of pending connection requests allowed before the system starts refusing connections.

//6

Size of the buffer used to receive incoming messages.

//7

Timeout used when returning a request to the client, specified in milliseconds.

You may customize this configuration to complement your Apache Web server configuration.

3.4.2 Configuring the Apache Web Server

The Agent uses mod_jk, provided by the Apache Software Foundation, to communicate with an Apache Web server. This module reads the Apache worker.properties file to configure the connections that the Web server makes to the Agent. This section provides some information about the settings in the worker.properties file. For complete information, see the Apache documentation. Also, this section alludes to but does not describe how to set up load balancing in an Apache server. Again, see the Apache documentation for this information, or refer to the Rogue Wave Knowledge Base for a relevant article.


For convenience, HydraExpress ships with certified binaries of the mod_jk library for some platforms. You can find these binaries in <installdir>\3rdparty\jk-1.2. Each platform-specific subdirectory contains a readme file with version and compatibility information. These libraries are provided as-is and are based on the versions of the Apache Web server certified against the product. If you have a different version of Apache and need the compatible mod_jk library, you can obtain the source and some binary versions at http://tomcat.apache.org/download-connectors.cgi.

The worker.properties file configures workers. A worker represents the concept of a connection to a server. A worker often corresponds to an actual on-the-wire connection, but it may also be an intermediary between the Web server and other workers. For example, a load-balancing worker is a connector that balances requests among a number of other workers.

Each configuration line has the format property=value. For example, the line below sets the port number for a worker named container1 to port 8007:

3.4.2.1 Setting the Worker Type

HydraExpress supports the following worker types:

To set the type of a worker, use the syntax worker.name.type=<workertype>. For example, the line below declares the worker with the name container1 to be of type ajp13:

3.4.2.2 Configuring AJP13 Workers

An ajp13 worker represents an AJP13 connection to the Agent. Each ajp13 worker has two required properties and two optional properties.

An ajp13 worker must be configured with the properties in Table 6:

Table 6: Required properties for an ajp13 worker

Property Description
host Name of the server that runs the Agent.
port Port number of the Agent. The default port for the AJP13 connector is 8009.

An ajp13 worker may be configured with the properties in Table 7:

Table 7: Optional properties for an ajp13 worker

Property Description
lbfactor Assigned weight for load balancing
cachesize Number of socket connections the Web server opens to the Agent. (If this property is not explicitly set, the server opens one connection.) Typically, this number should be equal to the number of acceptor threads specified for the connector associated with the port.

For example, the configuration lines below set an ajp13 worker named container1 to connect to port 8009 on the local machine:

If the optional elements were set, they might look like this:

For more advanced configurations, see the Apache Tomcat mod_jk documentation.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.