Calculating Peak Load On Your Blog’s Server

Numerous bloggers have reported that, on occasion, they receive a spike in traffic from one of a number of sources: a popular blogger or a social bookmarking site. Either way, the result is sometimes a massive influx of visitors, typically all at once, or over several hours for a few days. The problem is that most of us bloggers/ online writers have purchased low-cost website hosting plans that allow only so much web traffic per month. Exceeding that costs more money. Exceeding the limit in just a few days can get your website shut down temporarily by your host. So what to do?

The answer is to use a bit of forecasting, as discussed in the last several posts, and to approximate the amount of bandwidth currently being used daily or monthly. Then you can approximate when you might exceed your current hosting plan under normal traffic growth. (Please first read my previous “forecasting” posts, if you have not already done so.)

For example, let’s say that you have 6 months of traffic data for your weblog. (If you have multiple sites, analyze one site at a time.) Your data shows that average daily pageviews for the past month is 250. Assume that each post contains 10Kb (Kilobytes) of text and a 40Kb image that links to a larger version at 110Kb. (I’m making up numbers.)

The total data bandwidth your site uses for the most recent month, then, is about 30 d/m x 250 pv/d x (10 Kb + 40 Kb + 110 Kb)/pv = 7500 pv/m x 160 Kb/pv = 1,200,000 Kb/m = 1200 Mb/m = 1.2 Gb/m (Gigabytes/month). Now that is pretty puny bandwidth, considering that most “economy” hosting plans allow 50 Gb/m or more. I currently use two different domain hosts. One of them offers 250 Gb/m for just US$3.95/m (less if I pay 12 months in advance). If I need 500 Gb/m, I pay only US$5.95/m. Or for US$13.95/m I can get 1 Tb/m (1 Terabyte = 1,000 Gb).

So under this sort of scenario, you probably don’t have anything to worry about. Notice that I am not factoring the amount of bandwidth you use for transferring files from your computer to your web server. That cost is paid to your ISP (Internet Service Provider). So how many pages would you need daily, on average, to exceed your monthly limit? Well, given the example data above, we would need to exceed 250 Gb/m. Let’s break this down.

Given data:
Monthly bandwidth limit = MBL = 250 Gb/m
Average pageview bandwith = APB = 160 Kb/pv = 0.160 Mb/pv
Days per month: 30 d/m

Calculate:
Daily bandwidth limit = DBL = MBL/days = (250 Gb/m) / (30 d/m) =~ 8.333 Gb/d = 8,333 Mb/d
Daily pageview limit = DPL = DBL/APB = 8,333 Mb/d / 0.160 Mb/pv =~ 52,083 pageviews/ day

On the other hand, if you started running podcasts with audio or video files on a regular basis, your APB (avg pageview bandwidth) will increase dramatically, depending on the file formats that you are using. For example, .WAV files in CD quality stereo sound take up about 10 Mb per minute of audio recording. MP3 files, on the other hand, are a typically a lower quality and thus take up less space - sometimes 1/3 of the WAV equivalent. For video, .WMV (used by Microsoft’s Windows Media Player) takes up as little as 1/10 of the space of the high quality .AVI and .MOV formats.

So if you want/ need to publish high-quality multimedia files on your website, and you expect your site to eventually gain popularity because of it, you’ll want to regularly check your bandwidth usage. (Or you could opt for a free or commercial storage solution.)

For example, say that you expect that 1 of every 100 pageviews will be to one of your video posts. A short, high-quality video file might be 30 Mb. If you’re getting 250 pv/d, then you’ll get 2-3 requests per day for your video file. That’s between 60-90 Mb/d, which still doesn’t exceed the DBL of 8,333 Mb/d that we calculated earlier.

But if because of your high-quality video, you get linked from some popular site. The link gives you an extra 1000 visitors in a single day, all of whom view the video. That’s at least 30,000 Mb bandwidth usage for that day, over and above your typical average. You’ve exceeded your average daily limit, but are still under your monthly limit. Unless this goes on for several days, which sometimes happens. At this rate, you can only handle about 8-9 days of this bandwidth before you use up your month’s limit. And you’ve still got the rest of month to cover.

What if you had posted several videos, and the incoming visitors know this. As a result, each visitor might view more than one video on spike day. You now might use up your month’s limit in just a day or two. What’s more, because of the sudden influx of traffic, your server will slow down and some visitors will watch parts of a video, then return at a different time, hoping to watch the whole thing.

You can see how your monthly bandwidth could be used up very quickly with just one incoming link from a popular site, especially if you are a featured link. Most domain hosts will shut you down until you pay for an upgrade plan. Some might force this on you even if you do not expect to get the same kind of traffic again for a long time.

Given the low hosting plan rates available these days, it’s not a lot of money to bump up your hosting plan. A few years ago, the same plans cost $60/m and up. Today, a very busy website might have hosting plan that costs US$139/m.

If you suspect the possibility that your website might get a huge influx of traffic someday, there are ways to protect against that. Well, if you are running a weblog using the WordPress blogging platform, you can use Elliot Back’s Digg Defender plugin (found via Stupid WordPress Tricks).

Technorati Tags: , ,

Leave a Reply