Daniel Rench

Web application development : Servers : Networks : E-Mail : DNS : Databases : Programming for hire

previous : contact : linkedin : code : links : pictures : facebook : twitter : next

ApacheBench Enhancements

In 2004 I wrote a couple of patches for ApacheBench (installed as 'ab' in all versions of Apache from the past half-decade at least). One added the ability to override the hostname or ip address (rather than use the one derived from the URL), and another one let you specify a source IP address if the machine you were using had more than one.

Today, ab's -H option will let you set your own "Host:" header so there's no need for that first patch. The second one is another story. It has yet to set the ApacheBench community on fire, but I still think being able to set the source IP address is a useful feature.

I've ported my original set-the-source-IP patch to Apache 2.2. One significant difference from the 2.0 patch is that the command line option is -s instead of -b (which now sets the TCP window size). Using -s makes sense too, since that's what netcat and BSD telnet use to set a source address.

To use the patch, first download ab-src_address.patch, download and unpack the apache 2.2 source and:

% cd /path/to/unpacked/httpd-2.2.x/support
% patch < /path/to/ab-src_address.patch
% cd .. && ./configure && make && make install # careful here

I'm also maintaining this as a fork of Apache httpd on Github.

<< check_rcptto: a plugin for qpsmtpd | Home | Portfolio | Contact | 26th & California's reputation >>