What's the best way to integrate Apache with ZXTM?

ZXTM sits in front of Apache nicely. You can continue to use Apache without making any changes to its configuration although there are some things that it's worth changing to get the best results.

First, Apache normally logs the client IP address using %h. Because ZXTM works as a proxy, %h will log the IP address of the ZXTM connecting to Apache, which probably isn't useful! Instead, ZXTM inserts an additional header into requests, called X-Cluster-Client-Ip, which contains the client's actual IP address. This can be logged using the construct %{X-Cluster-Client-Ip}i -- which logs the named header in the request.

You can of course do logging on ZXTM, which would give you a little extra performance and would make consolidation of logs much easier should you decide to introduce additional services into a ZXTM-managed cluster at a later date.

If you're doing access control based on IP address, this is a little tricker in Apache although Zeus has written an Apache module that intercepts the X-Cluster-Client-Ip header and sets Apache structures correctly. If this is of interest, please contact sales@zeus.com

If SSL is used then it's well worth configuring ZXTM to perform the SSL decryption and have the communication between ZXTM and Apache unencrypted. ZXTM uses the RSA BSAFE crypto libraries which are quite a bit faster than OpenSSL. It's straightforward to copy SSL certificates into ZXTM from Apache too.

Whether you're using HTTP or HTTPS, ZXTM can significantly accelerate Apache, particularly when dealing with many concurrent clients. Because Apache is process-based (or thread-based) it incurs a non-trivial overhead when it has sent as much data down one connection as it can and starts sending data down another connection. If it's thread-based, that overhead is lower, but still significant.

ZXTM by comparison is single-threaded and is built around an I/O multiplexing engine that Zeus has been improving since the first release of Zeus Web Server back in 1996 -- and it was pretty efficient back then! This engine means that ZXTM can scale to very large numbers of concurrent connections -- tens of thousands -- all running at different speeds, without any one interfering with any other.

Because ZXTM also buffers client requests and server responses, it effectively decouples the client and server. This means that the server (Apache) can send potentially its entire response to ZXTM in one go -- remember ZXTM and Apache will be connected over a fast local network connection. As far as Apache's concerned, it's completed the request, and it's ready to handle another one, while ZXTM can feed the response out to the client at just the right rate.

The buffer sizes are tunable, so if you know you often have large responses going back to clients, you can increase the per-connection buffer size appropriately.

A white paper describing the performance gains that can be expected from ZXTM in front of Apache can be downloaded from here.

Stephen Davis [Zeus] 01 September 2005  Permalink  
Leave a comment ...
Your email address will not be displayed.
Your URL will be displayed.
This public messageboard is not a forum for technical support. To report technical support problems, please contact our dedicated Support team using the instructions at the bottom of this page.
Options:
 
(Line breaks become <br />)
(Set cookies for name, email & url)
Download Free ZXTM Desktop Edition

Recent Articles

Other Resources



www.zeus.com