The holidays are a busy time for many companies. And while that brings an exciting window of opportunity, it can also mean also more challenges to be prepared for.
More traffic on a website is good, but will your infrastructure be good enough for it? And your software? Is there a way to find it out before it hits your application or website? And how can you know before the next holiday rush?
The simple answer is: testing. And when it comes to traffic and load, performance testing is a must. With performance testing, you can make sure your application is able to sustain a huge burst of traffic, so that you can make the proper adjustments if it does not, before the real traffic hits it.
Here are a few tips to help make sure you’re prepared:
1. Identify possible “critical” scenarios
Your website might have many possible paths, but there are normally a subset of them that will likely be hit the hardest, such as landing pages, check out processes, special deals, or new products.
It is important that the most common transactions are ready for the next wave. You might know most of your critical scenarios off the top of your head. It’s still important to revisit this periodically. In the case of special deals and/or new products, you will need to make some updates. In the case of existing landing pages and check out processes, analytics can usually help you.
2. Reproduce your scenarios
Once you have your transactions identified, you need to find a way to generate them in a predictable way. For this purpose you can use performance tools. They can be script-based, or scriptless (like Nouvola). Scriptless tools allow for a faster time to execution, as they can generate your transactions within minutes. They also don’t require deep technical skills and time spent learning new languages.
Script-based (aka the “old” way) is typically much more time-consuming, and is not needed in the majority of the cases.
3. Estimate your traffic level
The next step is to find out your expected load. You probably have data for monthly unique visitors, and also expected number of visitors for bursts (if not, again analytics tools can be helpful here). This data needs to be translated into some value that can be used for your load tests. Your testing tool might be able to generate a certain number of virtual users per second, therefore generating large amount of users per minute or per hour. The number of unique visitors in your analytics data is normally calculated for wider ranges. A simple way to find your right traffic level for your tests is shown in this blog: http://blog.nouvola.com/getting-started-with-nouvola-divecloud-how-do-i-calculate-the-number-of-concurrent-users-to-test-with
4. Run your scenarios
Ok, so now you have your scenarios and you know how many users might execute them. All you need is to run your tests! Well, this is true if you have a tool that can take care of generating the load, and does not require much more configuration for infrastructure, results post-processing, test orchestration, statistical analysis, or scripts. Nouvola can be such a tool. Being scriptless, it allows you to easily set up how many users you need, in which geographic location they need to be, how many scenarios they can/should run concurrently, what network bandwidth, etc…Everything else is completely transparent to you.
The alternative is to do everything yourself: write a script to define your settings, allocate physical servers to generate your load, upload your scripts, run the scripts.
5. Interpret your results
And then, what kind or results do you expect?
A lot depends on the tool you use. Results can be just huge amounts of raw data that you will need to analyze, graph, process with some statistical analysis tool. Or in some tools (like Nouvola) results could already be presented in a way that easily highlights potential issues:
- errors during execution
- system behavior as traffic changes
- key performance indicators (KPI) like throughput, average response time
- distribution and percentiles
- top 5 requests consuming most of your time budget
At this point you have enough information to know if you are ready for the next holiday peak. If not, you will have to look at your critical transactions, or might need to improve your software, or your infrastructure. And because your tests are easily reproducible, you can run them again and iterate until you reach your goals.
So, no more sleepless night waiting for the next wave to come. Your app will be ready!