Green Light for Black Friday
Black Friday is always much anticipated – it brings advantages to both merchants and their customers. It never lasts for one day, of course; anyone who knows this frenzy will be glad to experience it again and again.
Well, almost everyone.
The owners of online shops probably know that it isn’t enough to offer generous discounts and deals, promotions, prizes and so on. Perhaps the most important part of preparations for Black Friday is getting ready for the huge influx of visitors. The more popular an online shop is, the stronger the wave of the visitors might be. This rush must be handled properly: it’s one of those days that can be worth of the whole year.
How thoroughly are you prepared for that merry rush? Have you examined all the possible problems that may arise? Let’s study together!
1. Visitors’ Surge
Can your site handle 1000 visitors per day? What about per hour? What about 10k of visitors per hour, or even more? You might know about the ‘Slashdot effect’, when a site is linked from another and very popular site, thus causing a significant increase in traffic. That could be a surprise, but a few webmasters are aware of how much visitors can their site sustain.
Well, you can also analyze how well does your site react to traffic spikes using specific services, such as LoadImpact. It’s free tool that shows how your site would handle up to 50 simultaneous connections. The chances are that even a simulation might bring your site down, but most probably it will not.
However, as the number of users increases and you see that the average response and the loading times aren’t even close to a horizontal line, it’s a sign that your site was planned and built without scaling in mind.
You can run further tests yourself, using tools like Low Orbit Ion Cannon, or other popular stress testing tools. However, some distributed services like LoadImpact could give you a more realistic impression on how a real visitors’ surge looks like. If you see that your site behaves poorly when stressed, time to make some improvements.
2. Design Wisely
Every site should be designed, planned and built wisely, with scaling in mind. It means that you need to optimize both software and hardware. Just browse some popular sites and look how do they look, what tools and services they use.
However, you would need an experienced system administrator to prepare a reliable basis for your site. This is really important: a proper design can save you from very costly solutions afterwards when you discover even more issues with your site.
3. Make It Static
Yes, we all know most sites are extremely dynamic these days. That’s fine and looks really nice, but it also causes higher stress for the site. So, unless absolutely necessary, you should use more static content. It really is possible even for an online shop!
4. Move Heavy Content Elsewhere
There are services, known as CDNs (content delivery networks) that can also remove stress from your site. A CDN has many servers, so called edges, that actually deliver content to users. The more powerful a CDN is, the more edges it keeps all around the globe. Amazon Cloudfront or CloudFlare are good examples of CDNs.
The more heavy content (e.g. media files) is moved away from your sever, the less your server will suffer. When establishing your site’s structure, make sure it can easily be switched to moving all heavy content away to CDN.
5. Cluster It
Everything can fail; what’s worse, something will most definitely fail in this imperfect world. That’s said about your Web server, as well. Although that can’t be avoided by using clustering.
In short: when all the server’s functions are being performed by several physical computers, we are talking about a cluster. If some parts of it go offline for any reason, the cluster as a whole can survive and continue working.
This is an advance technique; it’s close to so called Cloud technologies, but clusters are all about high reliability and scalability.
6. “B” for Backup
Regardless of how thoroughly you plan and prepare for an unexpected problem with higher traffic, everything can still go wrong. In such case, make sure you have a backup at hand. I do not talk only about making copies of important data; I talk about the possibility to launch a copy of your site in case its primary version is unreachable for some reason.
It isn’t necessary to have several powerful and expensive servers as backups; their primary purpose is to provide service until the primary location goes online again. It can be relatively easy to make an auto-start of a backup if the primary service goes offline. In any case, having backups in several locations is always a good precaution.
7. The Power of Monitoring
Make sure you gather statistics of every traffic spike you have ever witnessed. That will help you adapt to the traffic peak much easier. The best approach is to imitate traffic spikes, plan your actions for multiple different situations and get ready to handle all of the possible problems quickly.
Monitoring your services is also a very good idea. By tracking everything, you can see the bottlenecks of your services and take the appropriate measures prior to any real issues arise. You don’t want any problems when Black Friday is approaching. If you’re unsure what to use for monitoring, you can start with Nagios.
The last piece of advice is this: test it all yourself. Simulate traffic spikes and visitors’ surge, make sure you’re ready to do something for every possible situation. However don’t forget to check your site’s capacity prior to checking it the hard way. The same goes for all other precautions.
With that in mind, I can only wish a green light for your Black Friday. All set? Ready, steady, go!