Can Your Website Handle A Traffic Surge?

This morning a new website, RecessionWire.com, was mentioned on the CNN television broadcast. Just launched yesterday, this website is an online resource which provides support and information to people suffering job losses and other recession-related problems.

Since I was sitting at my computer, I immediately went over to take a look and assess the website for myself. But upon visiting, I was unexpectedly met with an error which stated that the website was unavailable, and that the server resources might have been exceeded… What a Cuil-esque way to waste some amazing countrywide exposure!

So, what about your website? Can it handle a traffic surge?

2 Ways To Ensure Website Availability

The problem with traffic surges is that we never know what to expect. So how do you prepare for a sudden increase in traffic?

1. Choose a suitable hosting package

Most of us use basic shared web hosting plans which claim to offer unlimited resources. These hosting packages are great under normal circumstances. They are full of great features and are very inexpensive. But when you test the limits of your unlimited package, you will find that there is indeed a cap on the resources that you can use, which results in website unavailability or downtime.

To prevent this from happening, choose a plan that is suitable for your website. The web host can usually assist you in finding an appropriate package.

2. Optimize your website to use fewer resources

While choosing a hosting package (or server) which can fully sustain your website is one approach, some thrifty webmasters choose a more affordable approach. Instead of focusing on the capabilities of their host, they focus on the optimization of their websites.

The reason a website may become inaccessible is because it places an undue strain on the server in terms of (1) excessive database queries, (2) sudden increased bandwidth usage, or (3) high memory or CPU usage. However, by optimizing your website, you can reduce all of these three factors.

Optimization Methods

Some optimization methods include:

  1. Caching. If you have a database driven website, you can minimize calls to the database by caching (storing static versions of a dynamically-generated web page). You can also use code to force repeat visitors’ browsers to save images, javascript, stylesheets, and other files.
  2. Compression. Another way to get some savings is to compress pages so that they are smaller. We use GZIP.
  3. Limit Database Queries. If you must have regular database queries, try limiting them when possible or making them more efficient.
  4. Optimize Images. In terms of bandwidth usage, it can be easily minimized by limiting the number of images on a page and reducing their filesizes. For information on image optimization, see our article "6 Ways To Optimize An Image".

 

You never know what to expect with a traffic surge. But with these tips, your website will likely be able to survive a special mention on television, or a front-page Digg appearance, without becoming inaccessible.

Tags: , , , , , ,

16 Responses to “Can Your Website Handle A Traffic Surge?”

  • On February 11th, 2009 at 12:03 am, Richael Neet wrote:

    Some people have horror stories of the “Digg Effect” when their hosting accounts (even on dedicated servers) crushed under the onslaught of massive traffic.

    Blog posts usually gain massive amount of exposure “out of the blue” and your hosting package should be such that does not suspend you on accidental abuse of server/memory limitations.

    Good post Shirley. :)
    Richael Neet’s last blog post..The Blogging Park - Where blogging is fun!

  • On February 11th, 2009 at 7:17 am, Velvet Blues wrote:

    @Richael: Yes, a ‘massive traffic onslaught’ is often unexpected. And I have heard some great stories about web hosts which manage to allocate more resources to an account to keep it up, instead of placing it on suspension. So having a good host is really important.

  • On February 11th, 2009 at 9:05 am, Kurt Avish wrote:

    I have not yet go through this flood of traffic till now. I hope if ever it happen my hosting dnt dump me else I will have to move. Till now the maximum I got in one day was recently for the cyclone post which was about 6000 in one day. Compared to other blogs which get on digg first page its nothing… Is there any tool or test service to know the capacity of the hosting server?

    Kurt Avish’s last blog post..How To Apply At UOM - Application For University of Mauritius 2009

  • On February 11th, 2009 at 10:15 am, Kim Woodbridge wrote:

    I’m pretty sure I can’t handle a traffic surge - I have had CPU issues just from plugins. I guess it’s a good idea to be prepared in advance. If I started getting more traffic I would definitely move away from shared hosting - at this point, however, it just isn’t cost effective.

    Kim Woodbridge’s last blog post..Adding WordPress 2.7 Threaded Comments to your Theme

  • On February 11th, 2009 at 11:02 am, Ajith Edassery | Blog Money wrote:

    Well, I doubt if mine can handle a traffic surge. In fact, I have optimized all my pages and images as much as I can, but my hosting service sucks. I plan to move to WP Super Cache for a faster serving of cached pages.

    I have the habit of being very stingy while naming javascript variables, HTML code spaces, using redundant HTML properties etc. In fact, in my very first web project back in late 90s we had developed a script that removes all carriage returns and unwanted spaces from HTML and compress it well using a custom algorithm and explode contents using Javascript at the client side. Those were the times when most ppl had 14.4K dial up :) and the pages used to appear in a jiffy. Would like to do something similar with WP :lol:

    Nice post and nice thought!

    Ajith Edassery | Blog Money’s last blog post..SEO Challenge ‘09 - Week 5 Update

  • On February 12th, 2009 at 4:39 am, Velvet Blues wrote:

    @Kurt: No, I don’t know of any tool which will tell you the capacity of your host. But perhaps if you ask your host what resources you can use, you’ll probably get a better idea.

    The problem with most shared hosting is that they are typically oversold. So you really have very limited resources to use, as the company restricts your usage to make sure that other sites maintain their uptime..

    @Kim: Wow, CPU issues from plugins? They must not have been well coded. Or perhaps your host gives you very limited resources.

    But price usually is a main factor in choosing hosting. After all, a good shared hosting plan can be acquired at less than $8/month. So, why pay $600 - $300 for VPS or dedicated?

    @Ajith: Where is that application that you wrote? Is it out there somewhere?

    You know, I can’t imagine optimizing a website for a 14.4K dial-up connection… It’d definitely be a very simple site. No images, no external media, limited JS, all CSS, and no whitespace… Hmmm. And those were the days of bulky tables…

    I am very glad that internet connection speeds have increased.

    As for WP Super Cache, it is a great plugin. I totally recommend it.

  • On February 12th, 2009 at 9:24 am, Ben Pei wrote:

    Yeah I have optimizing my images on my blog since I am trying to add more images on my posts these days. Gotta reduce loading time to capture your readers!

    Ben Pei’s last blog post..4 Crucial Things You Need To Do To Build your List

  • On February 12th, 2009 at 5:51 pm, Dennis Edell wrote:

    I’ve had to boost bandwidth a couple times due to stumbles, but never suspended thanks to Hostgator. :)
    Dennis Edell’s last blog post..New Comment Policy - You Want To Read This

  • On February 13th, 2009 at 8:38 am, Velvet Blues wrote:

    @Ben: Indeed. Images are a huge contributor to high load time. So optimizing them is definitely a good move.

    @Dennis: Yes, HostGator is a pretty descent host. It does take effort to get suspended. :-)

  • On February 13th, 2009 at 7:10 pm, Wei Liang | Earn Money Online wrote:

    Unless your web hosting service is really terrible, WP super cache should be able to handle the surge of traffic. This plugin saves me from a lot of work. Definitely a must have plugin.

    Wei Liang

    Wei Liang | Earn Money Online’s last blog post..Lesson 26: Affiliate Marketing (Part 3)

  • On February 14th, 2009 at 6:23 am, Nihar wrote:

    My site goes down as soon as i receive 500 to 600 visitors at a time. I am on shared hosting hosting.

    Irrespective of what optimizations we do, In order to handle a traffic surge, blog needs to be hosted on dedicated host.

    Nihar’s last blog post..Win a Flip Mino HD at Smarter Wealth Contest

  • On February 15th, 2009 at 6:33 am, Velvet Blues wrote:

    @Wei Liang: Yes, super cache is great. Not only does it reduce the server load, but it also increases website speed. And if you are expecting a surge, you can change your settings such that the cache lasts longer.

    @Nihar: Wow, 500 to 600 visitors at a time! Well, I see that you are using super cache… It could also be your host, and how many resources they can afford to give you at a time based on the other users on the server. I just checked them out, and… clearly their ‘unlimited’ isn’t truly that. ;-)

  • On February 15th, 2009 at 2:38 pm, Ajith Edassery wrote:

    @Shirley, nope… It was developed as part of a GE Capital project and obviously I didn’t keep the source code for myself. But it was damn fast… As I remember, most pages we compressed to 8-12K. As you guessed, it wasn’t image intensive pages :)

    Talking about hosting, I guess I need to switch to hostgator. The current one (hostmonster) has started showing problems when traffic surge happens though it’s a rare case.

    Ajith Edassery’s last blog post..SEO - Link Building Series: Internal Link Building and Optimization

  • On February 15th, 2009 at 7:29 pm, Velvet Blues wrote:

    @Ajith: Yeh, everywhere you turn, you will find glowing reviews of hostgator. I’ve used them and I often recommend them to others. So… if you ever switch, definitely give them a chance.

  • On April 7th, 2009 at 1:33 am, Ash wrote:

    I am using ixhosting and wondering if that can survive the effect.

    Ash’s last blog post..PHP 5.3.0RC1 Release Candidate Available

  • On September 14th, 2009 at 1:48 pm, Udegbunam Chukwudi wrote:

    So far so good, I haven’t experienced any taffic surge on my blog and I pray that whenever it happens, my blog won’t go down. I was using Hyper Cache to make it fast but somewhere along the line, I made the decision to hide ads from regular visitors and only show ads to search engine visitors. This decision required the use of a php function/plug-in and as we all know PHP doesn’t work with caching.

    At the moment, I’ve installed Wp Widget Cache to @ least make the widgets load faster. With this widget and a htaccess hack to force browser caching of my site’s elements, I’ve been able to maintain some level of speed in the loading time of my blog.
    Udegbunam Chukwudi´s last blog ..How To Upgrade Your Wordpress Blog In 30 minutes My ComLuv Profile

Trackbacks

Trackback URL for this entry:
http://www.velvetblues.com/web-development-blog/can-your-website-handle-a-traffic-surge/trackback/

Leave a Reply

CommentLuv Enabled

Want us to work on your project?

Contact us today for a quote. Click here to submit details regarding your project.

If you are making a general inquiry, send an email to info@velvetblues.com