Adventures in Web Hosting

The RealMetrics blog posed the question: Could Your Web Host be Missing Their Uptime SLA 37% of the Time?. They reviewed 50 web hosts over six months, measuring both availability and responsiveness and posted their results. Unfortunately they didn’t have anything from Dreamhost, the host behind this site.

There are many difficulties in measuring things like shared hosting. A positive experience with a host might be the result of chance placement with inactive accounts on the same server or could be negative for the opposite reason. I’ve had both good and bad experiences with Dreamhost since I started with them. The uptime that they’ve offered has been pretty good except for when they died right during two minor traffic surges I had a couple months back - just when you’d like your host to be up, it turns out.

In fact, those server deaths infuriated me enough to start my own uptime monitoring. My records haven’t been kept very assiduously, and it appears that since I started doing pings and regular downloads of content for test from my sites Dreamhost has been nothing if not stable.

For the curious, I just set up a super simple Perl script to ping the server every minute and output unavailability to a text file. Another script downloads a file at regular intervals throughout the day to gauge the average speed of the server.

Perl ping script:

#!/usr/bin/perl
use Net::Ping;
$| = 1; # sets output to unbuffered
$p = Net::Ping->new();
$host = $ARGV[0]; # takes the web host as single argument
$sequence = 0;
while ()
{
sleep(60); # run every minute
$sequence++;
next if $p->ping($host); # don't report if things are fine
my $time = localtime();
print $sequence . "\t dead \t" . $time . "\n";
}
$p->close();

Running the above code in the command line as follows:

./ping.pl whateversinteresting.com > pings.txt

writes errors to the file pings.txt (”pings” can be monitored in another terminal window with the “tail -f pings.txt” command).

I’ll add the downloads script later.

Post a Comment
*Required
*Required (Never published)