Load testing your site before a launch: how to do it without causing the outage

Speed, Cache & CDN·· 106 views· 4 min read

The short answer: a load test simulates many visitors at once to see whether the site copes and where it gives way first. It is useful before a campaign or a launch. But a badly run test can bring the site down itself or look like an attack. Do it small, on a copy, and warn us first.

What the site needs

What What to do
What it measures How many requests per second it handles, how fast it answers under load and what fails first (processor, memory, database).
Where to test Preferably on a copy of the site, not on the real site with customers in it.
How much load Start with little and go up in steps. The aim is to find the breaking point, not to jump past it.
What it is not It is not an attack, but from the server it looks like one: many requests from one place. On shared hosting it can hit limits and be blocked: IP blocked by the firewall.
What the cache changes A site with a page cache copes with far more than one without. Test with the cache on too: The page cache.

Getting started

1 Set the aim: how many visitors at once you expect at the peak, and which pages will be asked for most.
2 Warn us before a strong test and use a copy of the site, so an artificial peak is not taken for an attack or catches real customers.
3 Use a free load-testing tool and start with few virtual users, going up in stages.
4 Watch the server during the test: Seeing what uses CPU, memory and disk, and the plan’s limits: The limits nobody advertises.
5 Fix what gave way first (cache, images, slow queries) and repeat the test.
Never test someone else’s site or a service that is not yours. And even on your own, a strong test on a shared account can affect other customers on the server and be blocked. If in doubt, ask first and use a small load.
If what you expect is a real peak (a campaign, an event), see Preparing for a traffic spike. To tell a real peak from an attack: DDoS attack or just a traffic spike.

Want help planning a load test? Open a ticket with the address, the date and the load you plan to use.

Open a support ticket

Where to see it in your account

The plan's limits for CPU, memory and entry processes are shown in your own account, so read them there instead of from a table. Open Resource Usage in cPanel: it shows CPU, memory, entry processes and I/O, and when the account reached its limit. Open it right after the test. If it records a hit, the test found the plan's ceiling, which is useful to know before the campaign. The Statistics sidebar shows the space and databases in use.

To warn us, open a ticket before the test with the domain, the day and time window, how many virtual users you will reach, whether it is a copy or the real site, and the IP address the test comes from. If the result says the site needs more than the plan gives, you can move up a plan without losing the site, or choose a VPS (full SSH access, from 1 vCPU and 2 GB RAM) and size it yourself.

SEE ALSO

Preparing for a traffic spike: a campaign, a launch or a live event

Installing and tuning a page cache

DDoS attack or just a traffic spike: how to tell, and what to do

The site is slow: what actually makes a difference

CPU, RAM and disk I/O in plain words: what each one limits on your site

RECOMMENDED PRODUCT

Web hosting with cPanel

Domain and SSL included, daily backups and the panel you already know. from $6.60/mo (3-year plan, with coupon)

See plans
Was this answer helpful? Your answer helps us improve this article.