Contents ▼

Introduction to Load Testing

Large traffic spikes can occur when you launch a new product or feature, run a successful marketing campaign, or get featured on a prominent site. Sometimes traffic spikes happen randomly for no apparent reason at all.

If your site handles the traffic gracefully and delivers a good experience to all those users, the flood of traffic can be a smashing success. On the other hand, if your site fails to perform well, it can be an embarrassing failure.

High traffic events raise the stakes for your business. They present a unique opportunity, but they also carry risk.

Reducing Risk from High Traffic Events

So, is there a way to reduce the potential downside risk of a high traffic event?

Load testing is a way to do exactly this! By simulating heavy traffic ahead of time, you can prepare for it, and so you can know in advance (with a pretty high degree of certainty, anyway) how your site will respond to a flood of real users.

Load and stress testing can help you answer questions like these:

  • Will my site perform well on the busiest day of the year?
  • Do I have sufficient hardware or cloud infrastructure to run my application effectively?
  • Am I making good use of autoscaling, if hosted on the cloud?
  • Does my application deliver quick response times and a good user experience even under peak load?
  • When pushed to the limit, does my application crash hard and lose data?
  • Are there concurrency issues in my application that only appear under heavy load?
  • Do I have memory leaks and other issues that appear over an extended period of usage?
  • Are my redundancy and failover systems in place and working properly?

Unlike functional testing, which can be accomplished by a single user, load testing requires the right tools to simulate hundreds or thousands of concurrent users interacting with your application in a realistic way.

Answering Important Questions

Load testing techniques can be useful even if you don’t have specific performance or scalability requirements.

Especially in the early stages of a project, it can be incredibly useful to run some exploratory load tests to see what bottlenecks are encountered. Running load tests in rapid succession, while making changes to the software, is a great way to find obvious and not-so-obvious performance problems.

You can use load tests to investigate several different dimensions of a system’s performance:

  • Baseline Testing - How responsive is the system under minimal load and ideal conditions?
  • Scalability Testing - How many simultaneous users/transactions can my application handle, while still delivering acceptable performance?
  • Spike Testing - If the system receives a temporary spike in volume, does it handle the spike gracefully and recover properly afterwards?
  • Stress Testing - What happens when a breaking point is reached? Does the application handle load-related errors gracefully? Does it preserve data integrity?
  • Stability Testing - Does the application remain stable under sustained load?

In most cases, you’d want to explore each of these dimensions independently, by running repeated tests with different configurations. Before starting load testing, you should plan out your goals and pass/fail criteria to guide your efforts.

Are you load testing with a purpose? Read on for some ways to run a successful load test.