Thursday, February 09, 2012 at 6:30 AM
Webmaster level: IntermediateIt’s a moment any site owner both looks forward to, and dreads: a huge surge in traffic to your site (yay!) can often cause your site to crash (boo!). Maybe you’ll create a piece of viral content, or get Slashdotted, or maybe Larry Page will get a tattoo and your site on tech tattoos will be suddenly in vogue.
Many people go online immediately after a noteworthy event—a political debate, the death of a celebrity, or a natural disaster—to get news and information about that event. This can cause a rapid increase in traffic to websites that provide relevant information, and may even cause sites to crash at the moment they’re becoming most popular. While it’s not always possible to anticipate such events, you can prepare your site in a variety of ways so that you’ll be ready to handle a sudden surge in traffic if one should occur:
- Prepare a lightweight version of your site.
Consider maintaining a lightweight version of your website; you can then switch all of your traffic over to this lightweight version if you start to experience a spike in traffic. One good way to do this is to have a mobile version of your site, and to make the mobile site available to desktop/PC users during periods of high traffic. Another low-effort option is to just maintain a lightweight version of your homepage, since the homepage is often the most-requested page of a site as visitors start there and then navigate out to the specific area of the site that they’re interested in. If a particular article or picture on your site has gone viral, you could similarly create a lightweight version of just that page.
A couple tips for creating lightweight pages: - Exclude decorative elements like images or Flash wherever possible; use text instead of images in the site navigation and chrome, and put most of the content in HTML.
- Use static HTML pages rather than dynamic ones; the latter place more load on your servers. You can also cache the static output of dynamic pages to reduce server load.
- Take advantage of stable third-party services.
Another alternative is to host a copy of your site on a third-party service that you know will be able to withstand a heavy stream of traffic. For example, you could create a copy of your site—or a pared-down version with a focus on information relevant to the spike—on a platform like Google Sites or Blogger; use services like Google Docs to host documents or forms; or use a content delivery network (CDN). - Use lightweight file formats.
If you offer downloadable information, try to make the downloaded files as small as possible by using lightweight file formats. For example, offering the same data as a plain text file rather than a PDF can allow users to download the exact same content at a fraction of the filesize (thereby lightening the load on your servers). Also keep in mind that, if it’s not possible to use plain text files, PDFs generated from textual content are more lightweight than PDFs with images in them. Text-based PDFs are also easier for Google to understand and index fully. - Make tabular data available in CSV and XML formats.
If you offer numerical or tabular data (data displayed in tables), we recommend also providing it in CSV and/or XML format. These filetypes are relatively lightweight and make it easy for external developers to use your data in external applications or services in cases where you want the data to reach as many people as possible, such as in the wake of a natural disaster.


25 comments:
Surely the most important advice you can give someone to prepare for a spike is to implement a cache?
I am very much behind Google page algorithm
That's really a helpful post to handle traffic spike. This will help us to handle traffic at certain period of time...I really like the Google site option to tackle this situation....
Thanks for this update
Amardeep
Thank you for sharing this one ~ "A couple tips for creating lightweight pages:".
My #1 tip is to use a cloud service like Amazon S3 for all of your external assets like images, css, and js files.. etc.
Couple more ideas - Increase your RAM allocation if on a scalable VPS, look at using nginx instead of Apache web server, have a maintenance page display useful info so your visitors don't just see an error, have a plan for upgrading to a dedicated server when/if needed, consider making your lightweight pages static so they don't include logic for the cpu or database calls.
Excellent post for creating a website with minimum loading time. As we all know most of the peoples uses mobile phones to use the internet and finding any information. Thanks for a sharing a nice info.
I am using blogger as my domain on my blog Javarevisited , do we need to anything special for such traffic hike or blogger itself is capable enough to handle any sudden traffic hike due to content going viral?
Appreciate for this post. As the more people surf through the mobile phones, the more lightwight should be your site
Very nice
@bary and @dan: I couldn't agree more. To make your site light and fast you need to implement caching and a fast webserver. I use Lighttpd (lighty) because it's a bit faster than nginx.
These are strategies that all webmasters should look into to improve performance.
on Google Cyprus you put two languages Greek and Turkish. In Cyprus witch is a European country we speak only greek and not turkish and the turks that are here are after war and they keep our land. So why you put turkish language and not only greek, in Cyprus there is only republic of Cyprus and nothing else!!! i would like to check his and remove the turkish language from google cyprus
Very useful information specially "Prepare a lightweight version of your site" a fantastic idea and i'm going to do that for my website before it crashes.
I'm trying learning about Google algorithm, the explain above is very useful.
Thanx v much,this solved the lil confusion i was having
Nice info
thx
see my site
Thanks for the tips, very useful info.
I've been looking for some information for a long time now. Checking almost all posts here, can't really find an answer.
A few days ago, our server went down for about 20 hours, due a to a huge issue within our hosting provider (iweb). The very next day, we noticed we lost several our search rankings, thus traffic; about 50% less.
How does google takes a downtime like that?
can it work with flash video? Nice info anyway.
I implemented video schema on my site and when tested it with google snippet tool it does not shows the thumbnail in result but it fetches all data like URL, type, duration etc. Can you tell me whether i implemented correct or it has some flaws that's why thumbnail is not shown in result.
The best is to use a fast webserver and if you use php, a cache like apc.
But if you have a traffic spike the problem will be the database f.e. mysql. To much writes/reads will result a bottleneck.
A lightweight site (like mobile sites) use databases as well, so they are the primary part to optimize. The best is to avoid using databases f.e. caching request in a filecache/memcache or caching the complete site into a static html site, but is could result different problems (no interaction possible).
A concept would be:
- only static content is part of the html source (html elements, texts and search engine relevant multimedia) and this is delivered without using a database (filecache)
- design elements are outsourced into a external css file (logo, buttons, etc.)
- all interactive content will be loaded by using ajax by a external js file (f.e. users online, recent articles, etc.)
Now you check at random the current cpu load. If it is to high you kill the delivery of the css and js file
. No style images are loaded, no interactive (nonrelevant) elements are displayed, but the site is still working.
I recommend to use Google Webmaster Tools and look up the time spent downloading a page at "diagnostics>crawl stats".
If you are having spikes (maybe without having traffic spikes in the past?!) in this statistic you have problems with your server performance.
Cache is the really key. Ligthweight output is at second position.
regards,
Marc
Not that I need to worry about a traffic spike fix but I am curious about the advise to create duplicate content sites in the post. I thought one should stay away from that? Duplicate content.
Hello,
I am trying to sort out my website in google search listings using webmaster, i have been submitting my index but its been over a week and my website still shows the old data in search listing which i had on when i was constructing it. like site under construction and stuff. please help
Quality Targeted Website Traffic. 100% Guaranteed Real Targeted Visitors. Buy website traffic, Buy targeted traffic, and increase web site traffic.
Very usfull tips..
We got to get ready for any spike...
Post a Comment