It’s every webmaster’s worst nightmare: a surge in popularity causes traffic that brings your site down. How do you prevent this from happening?
An influx of new visitors to your site is excellent. Every visitor is a potential new customer, a prospective lead who might become a client in the long run. There is just one problem – what if your site cannot handle the new traffic?
The majority of users will abandon a site if it fails to load within 8 seconds. And even for those who wait, if their experience is laggy and frustrating, how do you think that reflects on your business? You need to prepare for these traffic surges in advance if your reputation is to survive them.
There are a few things you should do – and a few you should not.
Do: Request Increased Capacity Before A Surge, Where Possible
If you are aware that your site might experience an upturn in traffic, discuss it with your host. Ask them if they can scale up capacity in advance. This will not always be a viable option, so it may also be beneficial to work out an agreement where they provide you with scaling resources, as well.
Our Storm Cloud Servers, for example, scale resources up or down as your site requires – you can scale up just before you think your traffic will spike, and then scale down once the spike’s over.
Don’t: Always Run At High-Capacity
It can be tempting to always have your site firing on all cylinders, but doing so will cost you a great deal of money in the long run. At any given time, you should only be using the resources you need. Anything else is just capital you could be investing elsewhere.
Do: Use A CDN
A CDN (content delivery network) allows you to offload certain elements of your site – usually static ones – to locations around the globe. This allows visitors to your site to load these elements from a server much closer to them than your core location. And that, in turn, can drastically improve load times.
Don’t: Put All Your Eggs In One Basket
You need to be aware that sometimes a system can fail. All the precautionary measures in the world mean little if your server crashes as a result of an upturn in traffic. You need to make sure that everything is evenly distributed through the use of a tool such as a load balancer. By splitting resource demands across multiple zones and servers, it ensures that no single system is overwhelmed during a traffic spike.
Do: Compress/Optimize Files and Cache Pages
Where possible, deliver your web pages as compressed files, leaving a visitor’s browser to deal with decompression. You should also do the same with static content on your site, such as images. Last but not least, this content should all be optimized – choose the right file format and make sure the file is not too large.
Don’t: Go Overboard
There are certain things you should not compress, and a certain point at which you are damaging the quality of an image rather than optimizing it. And in the case of page caching, you need to ensure you account for dynamic content and changes to your site.
Do: Monitor And Analyze Constantly
The best way to prepare yourself for a traffic surge is to have a system in place to notify you that one is coming. To that end, keep a careful watch on how and where users access your site. Use a real-time monitoring solution that notifies you during periods of high traffic, and be sure to regularly test and examine your site for any bottlenecks that may exist. One excellent tool for monitoring your site for bottlenecks is a waterfall chart.
Don’t: Ignore Potential Bottlenecks
If, in the process of examining your site, you find a performance bottleneck – an image that is too large, a page that has issues loading, or an ad that drags down site performance – do not ignore it. Any bottlenecks, even potential ones, need to be dealt with immediately, no matter how minor. Because once site traffic starts to increase, even a tiny bottleneck can cause massive issues.
Now You’re Prepared for Traffic Surges
There you have it. Follow the guidelines here, and you should be well-prepared for even a massive upturn in site visitors. One last thing, though: Do not forget to keep maintaining your backups and overall site, too – that is especially important during high-traffic periods.