This post originated from an RSS feed registered with Java Buzz
by Brian McCallister.
Original Post: an interesting milestone: mod_slow
Feed Title: Waste of Time
Feed URL: http://kasparov.skife.org/blog/index.rss
Feed Description: A simple waste of time and weblog experiment
Crossed some kind of threshold today, I am sure. I needed a quick'n'dirty
web server hack so broke out C for an apache module! What is happening to
me?!
Basically, I needed something to put behind a proxy to do some load and
capacity testing of the proxy. As I wanted to have things like the size
of the response and time of the response be easily configurable on the
load generator I needed to hack something up...
This very nicely lets me drop artificial slowdowns in front of the the
default handler (serve up files) so I can control "processing time" and
file size (pick the file with the size I want):
http://binky/big.html?2000
Sweet! Am kind of floored that the first solution which leapt to mind for
me was an apache module in C, though!
For some reason, putting the sleep in fixups doubled the
sleep time, so I made it a declined handler and things worked fine. Need
to figure out why.... someday.