1. Use your historical data to anticipate your trafficUse your Google Analytics to find out what your traffic was on an average day before the previous Black Friday. Next, find out what the peak traffic was on the last Black Friday. Calculate the difference between these two metrics. You can expect this Black Friday traffic to be not less than the sum of this delta meaning with your current average daily traffic. So be sure that your website will handle this load plus 10%-20%.
If you don't have historical data, do some research and try to understand how Black Friday affects sales of similar businesses with similar offers. It will help you to predict the rise in traffic on your website.
2. Revise your infrastructure
If critical services in your infrastructure are not divided into separate servers or virtual machines, it's time to do this. Make the reorganization and find a solution to track key indicators (CPU, memory, bandwidth, pages accessibility, etc.). There are plenty of free and paid tools, so you can choose the one most suitable for you. It will help you to predict which system components may fail under the peak load or because of the sudden increase in traffic.
3. Perform load & stress testing
Load testing will show you how your system will perform under peak traffic. But even if your load testing shows you that your website can handle 1000 customers per second, it's not enough because it still may crash as a result of a sudden increase in traffic. That's why you also need stress testing.
«e sure to test everything that is critical for your online business: not only the main page but also product pages, category pages, the checkout process, user registration process, and also your special Black Friday landing pages and their integration with your main website.
Testing will show you possible bottlenecks in your system, so you can decide how to optimize it.
It's better not to test your live infrastructure because you don't want to disturb your real users during testing. Make a cloud copy of your infrastructure and test that instead.
4. Optimize your database Your website performance heavily relies on the state of the database. Here are some steps to optimize it:
- find expensive queries and move them out of the user request path;
- identify top-5 queries and ensure that their execution plan contains indexes;
- use caching;
- make a connection pool of cached database connections;
- if your engine has some unnecessary functionality that makes the load on your database, turn in off;
- if necessary, add some additional hardware (CPU, memory, etc.).
5. Optimize your web server Tools like PHP accelerators can be used to optimize overall code performance. You can also cache pages that are similar for all users and might remain unchanged for some time. Often it gives a good result because it eliminates the necessity to use a web server and database to service most of the requests.
6. Optimize your images, files, HTML, CSS and scripts You don't want huge images or outdated code to slow down your website on Black Friday. Here is what you can do:
- compress all images used on your website. For example, for WordPress websites you can use such plugins as Smush, ImageOptim или Shortpixel;
- remove any unused and outdated code;
- minify your HTML, CSS and Java Script;
- use browser lazy loading functionality;
- use some free tools like Website Performance tool to identify which elements on your website need to be optimized.
7. Get ready for unexpected Even if you have made all preparations you can, something may still go wrong. So be prepared for that. Tell your support and marketing team how to act in case of an outage of your website. And develop something user-friendly your customers will see in case of problems, not "502 Bad Gateway" error message.
Do you want your website to be prepared for Black Friday? We'll conduct load testing for you and provide recommendations on website optimization. Please contactboomq.io clients manager Mohamed Mehany at
m.mehani@pflb.us to learn more about our offer.