JEEKSSHIRE 24

Load testing an application and network: types, the testing process and reading the results

Load testing shows how an application behaves when many people use it at the same time: how many requests it can handle, how response time grows, where errors appear and what breaks first. It follows a process: goals, scenarios, a load profile, a separate environment with realistic data, a run with monitoring of the server and database, analysis of the results, fixes and a repeat run. You may load only your own systems and only by agreement, and external services are replaced with stubs or test modes for the duration of the test.

Open the software development page

What load testing is

Ordinary testing answers the question of whether a feature works correctly. Load testing answers whether it will keep working when hundreds of people use it at once. A special tool simulates the actions of many users: signing in, searching, placing orders, uploading files. Meanwhile, the team watches how response time, error rate and resource consumption change.

Without such a check, problems surface at the worst moment: on the day an ad campaign starts, during a sale or after a mailing to the whole customer base. Load testing is one type of testing alongside functional, regression and security testing; the full picture is in the guide to software testing.

Types of load tests

TypeWhat it checksWhen it helps
Load testBehaviour at the expected number of usersBefore launch and before major releases
Stress testWhere the limit is and how the system behaves beyond itTo know the headroom and make sure a failure does not corrupt data
Spike testA sharp jump in load over a short timeBefore mailings, ad campaigns and sales
Soak testBehaviour under load over a long periodTo find memory leaks and accumulating errors
Scalability testWhether performance grows when resources are addedBefore audience growth and when choosing a server setup
Volume testBehaviour with a large amount of data in the databaseWhen the database grows and reports start to slow down

You do not have to run every type. Usually you start with a load test and a spike test for the main scenarios and add the others when there is a reason.

When load testing is needed

For a small internal service used by a few dozen employees, full load testing is often excessive; monitoring and a check of the heaviest operations are enough. The decision is based on risk, not habit.

The testing process step by step

A load test is an experiment, and its result is useful only if the conditions are clear and repeatable. The usual order:

  1. Goals: how many users and operations the system must handle and what response time is acceptable.
  2. Scenarios: what users do, such as signing in, searching, browsing the catalogue and placing an order, and in what proportions.
  3. Load profile: how quickly the number of users grows, how long the peak lasts and whether there are sharp spikes.
  4. Environment: a separate setup similar to production in settings and resources.
  5. Data: a database volume close to the real one, without real personal data.
  6. Monitoring: server, database, queue and log monitoring switched on before the start.
  7. Run: load is applied in steps and the results are recorded.
  8. Analysis: where response time grew, where errors appeared and which resource ran out first.
  9. Fixing the bottlenecks and a repeat run under the same conditions.

Repeatability matters most: if the conditions differ each time, you cannot tell whether a fix helped.

What to measure

Average response time says almost nothing, because it hides slow requests. So a set of metrics is used:

The outcome of the analysis is not a table of figures but conclusions: up to what load the system still performs acceptably, what limits it beyond that and what must be done to raise the limit. How to speed up the bottlenecks found is covered in the guide to web performance optimization.

Load testing the network and external services

An application depends not only on its own code but also on the network: connections, the load balancer, the content delivery network, and external payment, delivery and notification services. Network load testing checks whether bandwidth is sufficient, how network latency grows under load and whether the load balancer distributes requests correctly between servers.

Overload protection is checked separately: request limits and queues should kick in predictably rather than bring the service down.

Test environment and data

Loading a production server during business hours is a bad idea: the test can slow down real customers. So a separate environment is used, as close to production as possible: the same versions, settings and server layout. If the environment is weaker, the results are interpreted with care and not transferred to production one to one.

Data is prepared in advance. A database with a dozen records behaves nothing like one with years of history, so the volume is brought close to the real one. Customers' personal data is not copied into test environments without anonymisation, and payment scenarios are tested only in the test modes of payment services so that no real money is charged.

Common mistakes

How JEEKSSHIRE 24 runs load testing

We plan load tests when a product has a real reason for them: a launch with advertising, audience growth, a move or a major architectural change. We agree goals and scenarios with the client, run tests on a separate environment with anonymised data and test modes of external services, and accompany the results with conclusions and a plan of fixes.

Tests, the build and linting pass before deployment, and failure alerts run after launch. If a system already in use needs checking, we start by reading the code and the monitoring. The acceptance procedure is described in the guide to software project acceptance, more on the software support page, and all our services are collected on the software development page.

Frequently asked questions

How is load testing different from stress testing?

Load testing checks behaviour at the expected number of users. A stress test looks for the system's limit and checks how it behaves beyond it and whether data stays intact.

Can a load test be run on a production server?

Only carefully, by agreement and at a quiet time. Usually a separate environment similar to production is used so as not to slow down real customers.

How many users should be simulated?

As many as expected at the peak, with headroom. The figure comes from analytics and advertising and mailing plans, not from guesswork.

What happens to external services during the test?

They are replaced with stubs or test modes. External services have their own limits, and loading them without consent is not allowed.

What is a response time percentile?

It is the value faster than which a given share of requests is answered. Percentiles show how the slowest requests behave, which the average hides.

How often should load testing be done?

Before launch, before expected peaks and after major architectural changes. Between them, monitoring is enough.

What is network load testing?

It is a check of connections, the load balancer and external dependencies under load: whether there is enough bandwidth and how latency grows.

Does a mobile app need load testing?

The main target is its server side, which every installed copy of the app calls. The app itself is additionally tested on a slow network.

What tools are used for load testing?

Specialised tools that simulate requests from many users according to a scenario and record response times and errors. The tool is chosen for the product's protocols and scenarios, and the scenarios are kept with the code so the test can be repeated.

IP geolocation by DB-IP