Beta This is new guidance. Complete our quick 5-question survey to help us improve it.
Test your service's performance
You must make sure your service can perform the tasks that users need it to do, even when it receives high levels of traffic.
If your service can’t handle expected (and unexpected) levels of traffic it may slow down or completely stop working, creating a negative user experience.
You need to do capacity planning during beta and then test your service’s performance regularly to make sure it hasn’t got worse over time.
Meeting the Digital Service Standard
Start with capacity planning
You need to do capacity planning before you can set up realistic performance tests for your service.
Capacity planning helps you decide the resources you need to keep your service operational. During beta, you should work out:
- how much traffic you expect under normal conditions
- how traffic and database queries will increase every month as the service grows
- whether there could be spikes in volume on certain days or months, for example on self-assessment deadlines, bank holidays or after advertising campaigns
This will help you decide which storage, hardware, software and infrastructure your live service needs.
You should check your capacity plan regularly to predict traffic numbers and make sure your service can handle estimated traffic levels. You should also look at performance results over time to:
- identify trends, for example if there are more users using your service on weekends
- estimate future technology costs
How to run performance tests
You must run regular performance tests to check how your service handles the number of users and interactions you expect.
One of the most valuable forms of performance testing is ‘load testing’. This is when you test your site or application to see how much traffic it can handle while still being able to function properly.
You should carry out regular load testing against your pre-production environments with:
- realistic traffic loads
- loads in excess of your expected traffic levels, for example by simulating a distributed denial-of-service (DDoS) attack
When you load test your service, you should gradually increase the load until the service breaks in some way and your monitoring tools alert you to an issue.
Record test results
When testing your service, you should record:
- the load at which the service broke
- how the service broke and what went wrong
Assess the risk
The service manager should decide if what you’ve recorded is an acceptable risk for your service. If it isn’t, you’ll need to change how your service behaves under extreme loads.
You could, for example:
- use caching to improve the performance of memory-intensive operations
- improve the performance of your code
- disable certain features when a certain load level is reached to keep the rest of the system working
Find out more about:
You may also find these guides useful: