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: , , , , , ,

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

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

    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. :)

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

      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.

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

    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?

    • Velvet Blues February 12, 2009 at 2:33 pm

      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 Woodbridge February 11, 2009 at 10:15 am

    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.

    • Velvet Blues February 12, 2009 at 2:33 pm

      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 Edassery | Blog Money February 11, 2009 at 11:02 am

    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!

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

      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.

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

        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.

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

          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.

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

    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!

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

    I’ve had to boost bandwidth a couple times due to stumbles, but never suspended thanks to Hostgator. :)

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

    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.

    • Velvet Blues February 14, 2009 at 2:35 pm

      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 February 14, 2009 at 6:23 am

    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.

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

      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. ;-)

  • Ash April 7, 2009 at 1:33 am

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

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

    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.

  • Craig January 8, 2011 at 3:50 am

    I use super cache too it’s wonderful. My blog loads pretty fast.

  • Mahesh May 24, 2011 at 4:44 am

    I get about 2k page views daily. I’ve installed super cache on my WordPress blog. But recently my host suspended my account due to over usage. CPU load went upto 56% on share hosting. I got my account back and have disabled several plugins now, but still the load is about 45%. Any ideas why this is so? Do I need to move to vps to handle the traffic?

    • Velvet Blues May 25, 2011 at 1:31 pm

      Congratulations on your traffic! It takes a lot of work to maintain a popular site.

      Regarding the site load, verify that your pages are indeed being cached. Caching alone should dramatically decrease the load on the server. And be sure to adjust your cache settings to find the optimal cache length. (I just visited your site and it doesn’t appear that WP Super Cache is enabled.) Additionally, you should also compress your HTML files. (Currently, only your CSS and JS files are compressed.) Finally, make sure that your shared hosting package CAN handle your website. It may be the case that your plan has not given you sufficient resources. And if that is the case, then no matter what you do, you will continue to run into the high load issue until you upgrade your hosting.

      Good luck!

Trackbacks

Trackback URL:

Leave a Reply

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

Go Daddy Deal of the Week: $2.95 .COM Domains! Offer expires 11/20/12!