mod_remoteApp

Expecting millions of hits per day
on minimal hardware?

Your persistent back-end apps
need not reside on same host as Apache.

This project was abandonded by end of 2006 in favor of Nginx's remote app feature, which I've since used in production for several deployments.

This is the next step beyond typical back-end web services, far beyond entry level CGI scripts.

Transfer only headers you'll actually use, and omit header names with a simple "binary" protocol over network traffic within your own server farm.

This is intended for those who consider mod_rewrite or mod_lisp as requiring unnecessary duplication of parsing HTTP headers.

This is open-source, free software.

Download:

0.3.1 - 24 November 2006
POST payload and Content-Length now extracted correctly from APR
mod_remoteApp-0.3.1.tar.bz2
0.3.0a - 23 November 2006
added minimal ANSI Common Lisp client (SBCL)
mod_remoteApp-0.3.0a.tar.bz2
0.3.0 - 16 October 2006
first public release: with trivial C client for testing
mod_remoteApp-0.3.0.tar.bz2

See README and LICENSE for more information.

On the road to v1.0, there may be protocol incompatibilities between certain 0.x versions.


We refrain from calling the persistent app "a CGI script" because-- not only will it rarely be a script-- but this purposely violates the customary CGI protocol.

That's the whole point.

The CGI protocol forces duplicate parsing of HTTP header information. While it's simple and easy to learn, it's inherently inefficient. If you're expecting millions of hits per day, wasted computation in a server farm translates into power consumption, heat and rack space, all of which are quite serious matters.

This protocol, on the other hand, uses Pascal style strings-- length then content-- such that the receiving side knows exactly how much memory to allocate, if necessary, prior to receiving the value. (In practice, however, you'll receive a block of data from the socket into a large buffer and step through that buffer.)

More to the point is the difference between processing and parsing. Processing required here is precise as the first item always goes into slot A, the second into B, and so on; whereas, parsing involves comparison, hashing, etc. Apache has already done that, so why repeat it?

The nature of this length-then-value approach helps eliminate an entire class of buffer overflow attacks.

Additionally, because parsing of header names is omitted, duplicate hash key attacks are also entirely eliminated.