Guides »

Introduction to Load Testing

Reading Time 14 Minutes
Last Updated 2024.08.01

What is Load Testing?

Load testing is the technique of simulating many users on a website or web application, to measure its performance under heavy load.

This type of software performance testing is concerned with scalability, which is the ability of the system to maintain fast response times with lots of concurrent users or many simultaneous requests.

Conceptually, load testing web applications is similar to load testing in the physical world. Bridges, roofs, and other physical structures can be load tested by weighing them down with heavy objects to make sure they meet their load bearing requirements. Of course, a site or web application crashing isn’t as dangerous as a bridge falling down, but load testing is nonetheless important if you want to ensure scalability and reliability of your software systems.

A website under minimal load, when just a few users are using it and a trickle of requests are coming in, often performs fine and and responds quickly. But the same site under a huge flood of traffic responds slowly or might not respond at all.

Load testing (including stress testing, spike testing, and stability testing) is the best way to measure your site’s scalability and determine how it will perform under heavy load.

Why is Load Testing Important?

The reason load testing is so important is that predicting how a software system will behave under heavy load is almost impossible without actually observing it under load.

We’ve all seen websites crash or slow down under heavy traffic. This famously happens around shopping frenzies like Black Friday or entertainment frenzies like Taylor Swift concerts, but it can occur anytime your site receives extra traffic for any reason, like a major feature launch or marketing campaign, or for no apparent reason at all.

Site crashes are harmful and costly. Downtime results in lost business and wasted exposure, and often brings bad publicity that damages your brand when frustrated users give up and look elsewhere.

Even if you run a web application with a captive audience, instability and sluggish performance are annoying and unproductive. Nobody likes them.

Just because your site performs fine with current levels of traffic doesn’t mean it will perform fine with higher levels of traffic in the future.

Website performance under load is unpredictable

Every site or web application has its breaking point, beyond which it can’t handle any additional throughput. When that breaking point is reached, the site’s performance degrades in a very non-linear fashion.

What do we mean by non-linear?

Consider the following table of average response times at different levels of load from an example site. The first column is the number of concurrent users active on the site, and the second column is the average page load time those users are experiencing.

Concurrent Users Average Response Time
100 0.251s
200 0.253s
300 0.254s
400 1.267s
500 10.35s

Notice how the average response time barely increases as the load increases from 100 to 200 to 300 concurrent users. It edges up noticeably at 400 concurrent users, but gets far worse at 500 concurrent users, to the point of being almost unusable!

If you were to graph these data points you’d see a classic “hockey stick” graph, which is decidedly non-linear.