Lorixen.
EN

Load testing a web app before a launch or busy season

Short answer: Load test when a known event will send far more people to your app than usual at once: a ticket release, a holiday sale, a campaign launch, the first day of registration. Start about four weeks out, script the few journeys that matter (search, book, pay), run them against a staging copy, and set pass/fail thresholds before you look at the results. Expect the first bottleneck to be the database or a third-party service rather than the web server.

An ordering app that copes fine on a normal Tuesday can stall when a newsletter lands in ten thousand inboxes at 9 a.m. The traffic isn't spread out; it arrives in a wall. Load testing is how you find out what breaks while there's still time to fix it, instead of finding out from customers.

This plan assumes a launch or peak date about four weeks away. Shift it to suit your calendar.

Is it worth it for you?

Load testing takes effort, so be honest about the risk first.

  • Worth it: timed releases (tickets, limited stock, class registrations), big email or ad campaigns with a fixed send time, seasonal peaks you've struggled with before, a new system replacing an old one.
  • Probably not worth a full program: a brochure site on managed hosting, or an app whose busiest hour is only slightly busier than average. A short smoke test after major changes may be enough.

Four weeks out: define what "busy" means

Pick the journeys. You don't need to simulate everything. Choose the two or three paths that make money or cause the most pain if they fail. For a booking app: open the calendar, check availability, reserve a slot, pay. For ordering: browse the menu, add to cart, check out.

Estimate the load. Use your own analytics from past peaks if you have them, and your campaign plans (list size, send time, expected open behaviour). Be explicit that this is an estimate, and plan to test above it.

Choose the tool. Common open-source examples:

  • k6 from Grafana Labs, where tests are written as scripts and run from the command line.
  • Apache JMeter, a Java application. Its project page makes an important point: JMeter works at the protocol level and is not a browser, so it does not execute JavaScript in pages. You test the requests your app makes, not the page rendering.
  • Locust, where, according to its documentation, test scenarios are written in plain Python and results (throughput, response times, errors) can be viewed in real time through a web UI or command line.

Pick the one your team can write and maintain. The tool matters less than realistic scenarios.

Set up staging. Test against a copy of production that matches it as closely as you can: same hosting size, same database engine, realistic data volumes. Never point a heavy test at your live site without agreeing on it first with your host, since it can look like an attack and affect real customers.

Three weeks out: script and run the first tests

Write thresholds first. k6 describes thresholds as the pass/fail criteria for test metrics; if the system doesn't meet them, the test finishes with a failed status. Their example sets an error rate under 1% and 95% of requests under 200 milliseconds. Your numbers will differ, but decide them before testing so you aren't tempted to move the goalposts.

Run tests in order of intensity. k6's guide to test types recommends starting with smoke tests and progressing to higher loads and longer durations:

Test type What it tells you When to use it
Smoke The script works and the system copes with minimal load First, and after every change
Average load Performance under expected normal traffic Baseline before peak
Stress How the system behaves above average Before a known busy period
Spike Survival under a sudden, short, massive jump Ticket drops, campaign send times
Soak Reliability over hours Long sales events
Breakpoint Where capacity actually runs out Occasionally, to find limits

For most launches, the spike test is the one that matters most. The same k6 guide notes that no single test uncovers every issue.

Make the scripts realistic. Add think time between steps, use different test accounts, and pick different dates or products so you aren't hammering one cached page. A test where every virtual user books the same slot at the same second mostly tests your locking logic.

Two weeks out: find and fix the bottleneck

Look at the results alongside your server and database monitoring. The usual suspects:

  • Database queries. Slow availability checks, missing indexes, or one query running for every item in a list. These often show up as response times climbing steadily with load.
  • Connection limits. The database or app server runs out of connections and requests queue up.
  • Third-party limits. Payment providers, email or SMS services, maps and address lookups all have rate limits. Check each provider's documentation for limits and test modes, and never load test against a live payment account.
  • Session or cart storage. Carts stored in a slow place, or locks on shared rows.
  • Uncached pages. The menu or event listing rebuilt from scratch on every request.
  • Autoscaling that's too slow. New servers appear, but only after the spike has done its damage.

Fix the biggest problem first, then retest. One fix often reveals the next bottleneck.

One week out: retest and rehearse

  • Rerun the spike and stress tests with the fixes in place. Compare against your thresholds.
  • Run one test slightly above your high estimate, so you have headroom.
  • Prepare a fallback: a virtual waiting room, a simple "high demand, please try again in a few minutes" page, or the option to pause sales.
  • Write down who watches what on launch day, and how to reach your host or developer.

Launch day

  • Freeze code changes for the day.
  • Watch error rates, response times and the database, not just whether the homepage loads.
  • Have someone place a real test booking or order shortly after the peak begins.
  • Keep the fallback ready, and use it early rather than late.

Afterwards, note the real peak and compare it with your estimate. Next season's test starts from real numbers.

FAQ

Can I load test my live site?

It's risky. Real customers may be affected, and your host may treat the traffic as an attack. Use staging where possible, and if you must test production, agree on it in advance and run it in a quiet window.

How many virtual users should I simulate?

Base it on your expected peak, then test above it. Virtual users don't map exactly to real people, so focus on requests per second and completed bookings or orders.

Do I need a paid service?

Not necessarily. k6, JMeter and Locust are open-source. Paid cloud options can generate larger loads from several locations; check the provider's pages for what's included.

What if the test shows we can't cope?

That's the point of testing early. Fix the bottleneck, add caching, increase capacity, or plan a waiting room for the busiest minutes.

A launch is far calmer when you already know where the app will strain, and we can help you plan and run those tests before your next big day.

Sources

WhatsAppLet’s talk