While I am waiting for Apache to build with the libtool –debug option, I thought I would share my thoughts on the siege utility. Siege is an open source HTTP regression and debugging utility. I have used curl and ab in the past to debug and benchmark websites, but prefer siege, since it allows me to debug and benchmark websites with a single well written utility. To debug the HTTP requests to a server, you can run run siege with the “-g” (Grab headers) and “-u” (URL to grab) option:
siege -g -v -u https://prefetch.net
This displays a summary of the request/entity headers for the entire HTTP transaction, and is super useful for debugging. To simulate 5-users hitting a website with a delay between successive page loads, siege can be run with the “-c” (user count), “-r” (number of times to run the test), and “-d” (add delay between 1 and the option passed to “-d”) options:
siege -b -v -c 5 -r 5 -d 10 -u https://prefetch.net
The Failed transactions, Response time, and Longest and Shortest transactions statistics can be used to profile a website, and to get an accurate picture of the time it takes to process a transaction. Siege also allows you to define a slew of URLs in a file called urls.txt, which will be processed during a connection from each user. I would like to thank Jeffrey Fulmer for writing the software! Make sure to check out his article in this month’s SysAdmin magazine.