Skip to content
Grocito
← All posts

Load Testing and Scalability Planning Before a Launch

By Grocito

Load Testing and Scalability Planning Before a Launch

Load testing means putting realistic traffic on your system before real customers do, so you find the breaking points while fixing them is still cheap. Scalability planning uses those results to decide what to cache, scale or simplify. Test the journeys people really take, such as browse, search, login and checkout, in a production-like environment, then fix bottlenecks and retest before a launch or sale.

Key takeaways

  • Load testing checks expected traffic, stress testing finds the breaking point, spike testing checks sudden jumps and soak testing checks long periods.
  • Test before any campaign, sale, launch or press mention, not after the first outage.
  • Build scenarios from your analytics so that the test resembles real behaviour, including slow, expensive paths such as search and checkout.
  • Watch response-time percentiles, error rate, throughput and saturation of servers and the database, not just averages.
  • Most bottlenecks sit in the database, missing caching, connection limits or third-party calls.
  • Plan graceful degradation: a queue, a waiting room or switching off non-essential features is better than a crash.

What is the difference between load, stress, spike and soak testing?

These terms get blurred, so here are plain definitions.

  • Load testing: apply the traffic you expect at peak and confirm the system stays fast and correct.
  • Stress testing: keep increasing traffic past the expected level to see where and how the system fails. The goal is to learn the limit and whether it fails gently or violently.
  • Spike testing: jump suddenly from low to high traffic, as happens when an email goes out or a link goes viral. This reveals slow startup and scaling delays.
  • Soak testing: hold moderate traffic for many hours to expose memory leaks, growing queues, full disks and connection exhaustion.

Why test before a campaign or sale?

Traffic from a campaign is concentrated, unforgiving and expensive. Your marketing spend delivers visitors at the exact moment your system is under strain, and a slow or failing site wastes that spend. Finding that the checkout stalls when many people use it at once is a cheap discovery on a Tuesday afternoon and a very costly one at launch time.

How do you define realistic scenarios?

A test that only requests the home page proves very little. Start with your analytics.

  1. Identify the main journeys. Common ones are browsing categories, searching, viewing a product or page, logging in, adding to cart and checking out, or for an application, opening a dashboard, creating a record and exporting a report.
  2. Estimate the mix. Which share of visitors do each? Analytics show how many only browse and how many reach checkout. Use these proportions in words and ratios, based on your own data.
  3. Add think time. Real people pause between clicks. A test with no pauses overstates load per user.
  4. Include the heavy actions. Search, filters, reports and file uploads are often the first to fail.
  5. Use realistic data. A catalogue of ten products and a database with a few rows behaves very differently from the real one.

What should the test environment look like?

The environment should resemble production in the ways that matter: similar server sizes or settings, a database with a realistic volume of data, the same caching and network layers, and the same configuration. A tiny test server will fail early and tell you nothing useful, while a much larger one will hide problems.

Two cautions apply. First, never run load against a production system without a plan and a quiet period, as you may disturb real customers. Second, never test third-party services, such as payment gateways, email providers or partner APIs, without their written permission. Many providers offer sandbox environments, or you can replace them with simulated responses during the test. Their terms often forbid load tests, and some will block your account.

Which metrics should you watch?

Numbers need context, so decide your targets before the test and write them down.

  • Response time percentiles: the median tells you what a typical visitor sees, while the slowest few in every hundred requests, often called high percentiles, reveal pain that averages hide. Agree what "fast enough" means for each journey.
  • Error rate: the proportion of requests that fail. Under load, even a small rise deserves investigation.
  • Throughput: how many requests or orders the system completes per second. It should rise as load rises, then flatten at the limit.
  • Resource saturation: processor, memory, disk, network and connection pools. The first resource to hit its ceiling is your bottleneck.
  • Database load: slow queries, lock waits and the number of open connections.

Our guide to monitoring and observability basics explains how to collect these measures so they are available before the test, not just during it.

How do you find bottlenecks?

Increase load in steps and watch what degrades first. Typical culprits include:

Database queries

Missing indexes, queries that fetch far more data than needed, and the same query run hundreds of times per page. Profile slow queries and fix the worst offenders first.

Caching gaps

If every visitor triggers the same expensive work, cache it. Pages, fragments, API responses and the results of heavy calculations are all candidates. A content delivery network can serve static assets and some pages without touching your servers.

Connection limits

Databases, application servers and external services all have limits on simultaneous connections. Running out produces sudden errors rather than gradual slowness.

Third-party calls

A slow payment, shipping or search provider can hold up every request that waits for it. Use timeouts, run non-critical calls in the background and avoid calling external services on every page view.

What is the cycle for fixing and retesting?

Treat it as a loop. Run the test and record results, identify the first bottleneck, make one change, retest with the same scenario and compare, then repeat until you meet your targets with a sensible safety margin. Keep a short log of what you changed and what happened, as it helps with the next launch.

How do autoscaling and caching help?

Caching reduces the work per request, and scaling adds capacity to do more work. Use caching first because it is usually cheaper and benefits all users.

Autoscaling adds servers when load rises. It helps with steady growth, but it is not instant: new capacity takes time to start, which is why spike tests matter. It also does not fix a database bottleneck. Adding more application servers that all hit the same overloaded database can make things worse. If you run on cloud infrastructure, our DevOps services can help set up scaling rules, caching layers and tests that fit your stack.

How do you plan capacity without exact numbers?

You do not need precise forecasts, just reasoned ranges.

  • Ask marketing and sales what is planned, such as an email send, a partner promotion or a seasonal peak.
  • Test well above the expected peak, to leave margin for the unexpected.
  • Decide in advance which limits you can raise quickly, and who may spend extra on capacity during the event.

What is graceful degradation?

If demand exceeds capacity, choose how you fail. Options include:

  • Queues: accept orders or requests and process them in order, telling the customer clearly that processing is in progress.
  • Waiting rooms: let a limited number of visitors in at once and show the rest an honest waiting page.
  • Feature shedding: switch off expensive but non-essential features, such as recommendations, live stock counts or heavy animations, to protect checkout.

Decide in advance who can switch each of these on and off, and practise it.

What should you monitor and communicate during launch?

Create a simple launch plan: a shared dashboard with response time, errors, queue length and database load, named people on call for application, database and infrastructure, a list of thresholds and the action for each, a prepared customer message, a rollback plan for the release itself and a short review afterwards.

Common mistakes to avoid

  • Testing only the home page or a single endpoint.
  • Using a nearly empty database.
  • Having no way to turn features off during an incident.

A worked example

Imagine an online retailer planning a seasonal sale announced by email. Its scenarios mirror analytics: many people browse and search, fewer add to cart and fewer still check out. A test in a production-like environment shows search slowing and the database running out of connections. The team caches category pages, fixes two heavy queries and raises the connection limit, then a spike test shows servers starting too slowly, so it schedules capacity ahead of the email. A feature switch is ready to hide recommendations if needed, and the sale runs smoothly.

FAQ

What is load testing and why is it important?

Load testing simulates realistic numbers of users on your system to see whether it stays fast and reliable. It is important because it reveals bottlenecks before a campaign or launch, when fixing them is far cheaper than dealing with an outage in front of customers.

What is the difference between load testing and stress testing?

Load testing checks that the system copes with the traffic you expect. Stress testing pushes beyond that to find the point where it fails and how it behaves when it does. You need both to plan capacity and recovery.

How do I plan capacity for a sale or product launch?

Gather the marketing plan and past peaks, test comfortably above the expected load, fix bottlenecks and agree in advance how to add capacity or switch off non-essential features. Keep a monitored dashboard and named people available during the event.

Can I load test a third-party service like a payment gateway?

Only with the provider's written permission. Many providers forbid load testing against their live systems and may block your account. Use their sandbox, or simulate their responses in your test environment.

Related reading

Next steps

Pick your most important journey, usually checkout or signup, and write down how many people you expect at the busiest moment of your next campaign. Build a simple test around it, run it in a production-like environment and fix the first bottleneck you find. If you would like help planning tests, scaling or a launch-day runbook, contact us and we will talk through your setup.

More from the blog

Let's build together

Ready to take your business to the next level?

Tell us what you need. We will reply within one business day with next steps.