← Useful
3 October 20267 min read
News

Can the website handle the campaign? Test the operating environment before the traffic peak

Hosting & operations: A practical method for identifying bottlenecks in caching, CDNs, servers and databases before campaigns or important launches.

A website can perform perfectly in everyday use and still grind to a halt when a campaign takes off. This is often because the operating environment has been selected and configured for normal traffic, while capacity under concurrent visits has never been assessed.

The problem may appear as slow pages, form errors, products that are sold out but can still be ordered, or a complete stoppage in the payment flow. In that situation, it helps little that the hosting agreement promises high uptime. Uptime does not necessarily say anything about how fast or usable the website is when the load increases.

A capacity test gives you a more realistic answer. The goal is not to push the server until it fails, but to identify the limits, bottlenecks and measures needed before the traffic arrives.

Kapasitet må vurderes ut fra både trafikk og brukerhandlinger.
Capacity must be assessed based on both traffic and user actions.

Start with the traffic peak you actually expect

It is easy to ask the provider to ensure that the website can handle “a lot of traffic”. That is too imprecise for sizing an operating environment. The load depends both on the number of visitors and on what they do.

A thousand people reading the same cached article may be an easy task. Far fewer users searching, logging in, filtering products or completing purchases can create a much higher load. Such requests often need to be handled by the application and database for each user.

Describe the expected peak in concrete terms:

  • Where will the traffic come from, and how quickly is it expected to arrive?
  • Which landing pages will visitors see?
  • Will users read content, submit forms, log in or complete purchases?
  • Will many users perform the same action simultaneously?
  • Which external services are part of the user journey?
  • How long is the high load expected to last?

An email campaign can create a sudden peak within a few minutes. Search traffic following media coverage may build more gradually. A campaign with a fixed start time may send many users directly to the same product page. These situations require different tests and measures.

Distinguish between cacheable and dynamic content

Caching is often the most effective measure for handling increased traffic. A pre-generated page can be delivered without requiring the content management system and database to rebuild it for every visit.

En realistisk test omfatter hele den kritiske brukerreisen.
A realistic test covers the entire critical user journey.

But not everything should or can be cached. Shopping carts, checkout pages, logged-in areas, personalized prices and certain form results are dynamic. It is therefore misleading to capacity-test only the home page if the most important user journey ends in a dynamic solution.

Test multiple caching layers

A professional operating setup may use several caching layers:

  • Browser cache reduces the need to download unchanged files again.
  • CDN delivers images, stylesheets, scripts and, where applicable, entire pages from servers closer to the user.
  • Page cache stores pre-generated pages and reduces the load on the application.
  • Object cache reduces repeated and costly queries to the database.

Do not just check whether caching is enabled. Examine which pages are actually served from the cache, how long content is stored, and what happens when the cache is cleared. A campaign may start slowly if thousands of visits hit a cold cache layer at the same time.

Also test that the exceptions are correct. Incorrect caching of shopping carts, logins or personal data can create problems far more serious than slowness.

A CDN does not protect the entire solution

A CDN can absorb a large amount of traffic and reduce the load on the origin server. It is particularly useful for large images, downloadable files and content that is the same for everyone. At the same time, a CDN can conceal weaknesses if the test covers only cached pages.

Tydelige målinger og roller gjør trafikktoppen enklere å håndtere.
Clear measurements and defined roles make the traffic peak easier to manage.

The origin server must still handle requests that are not in the cache, dynamic functions and cache updates. The database must process searches, orders and logins. Payment solutions, inventory connections and CRM integrations may have their own capacity limits.

Consider the entire chain. The website is no more robust than the weakest link in the most important user journey.

Choose the operating environment based on impact and variability

The right operating environment is not just about how much traffic you have on average. It is also about how large the variation is and what an outage would cost.

A managed platform may be a good fit when the business wants the provider to handle server setup, security updates, backups and basic monitoring. A more isolated environment may be appropriate when the solution has demanding integrations, substantial dynamic traffic or a need for clearly separated resources. Scalable cloud solutions may be suitable for large and unpredictable peaks, but autoscaling must be configured and tested. It does not happen by itself.

Consider, among other things:

  • Whether processor, memory and database capacity are shared with other customers.
  • How quickly capacity can be increased when needed.
  • Whether increased capacity happens automatically or must be ordered manually.
  • Who monitors the system as the load increases.
  • Whether the provider has limits on concurrent processes or requests.
  • How costs change under heavy traffic.

A more expensive environment is not automatically better. A misconfigured solution with plenty of capacity can still be slow. Sizing must be combined with the right caching, database work, maintenance and monitoring.

Conduct a realistic capacity test

The test should replicate real usage patterns without creating unnecessary risk. Do not start a heavy test against the production environment without informing the operations provider and obtaining approval for the timing.

  1. Choose critical user journeys. Test the landing page, product search, forms, login or checkout process based on what the campaign is intended to achieve.
  2. Create a comparable test environment. The server setup, cache layer, database and key integrations should resemble production. A small development environment provides few useful answers.
  3. Start with normal load. Document response times, errors and resource usage before increasing traffic.
  4. Increase gradually. A controlled ramp-up makes it possible to see when performance starts to decline and which component reaches its limit first.
  5. Test both warm and cold caches. This shows the difference between normal operation and the situation after a cache purge or deployment.
  6. Include dynamic actions. Do not measure page views alone. Test what users are actually expected to do.
  7. Define stop criteria. End or reduce the test if the error rate, response time or resource usage exceeds agreed limits.

Record the results in the same way for each test. This makes it possible to see whether a change actually improves capacity instead of basing decisions on gut feeling.

Monitor both technical and business-critical signals

CPU and memory usage are useful metrics, but they do not on their own indicate whether the website is working. During the test and traffic peak, you should also monitor response times, database load, cache hits, queues, error messages and the availability of external services.

Combine this with signals from the user journey:

  • Are forms actually being submitted?
  • Can users add items to the shopping cart?
  • Are payments completed and recorded correctly?
  • Are inventory status and order data updated?
  • Are receipts and other automated messages working?

Monitoring must have clearly defined owners. Clarify who assesses an alert, who can increase capacity and who can stop a campaign if the solution is not functioning properly.

Protect the period before the campaign

Unnecessary changes immediately before a traffic peak increase risk. Introduce a short change freeze for software updates, new integrations and major content changes. Critical security updates must still be assessed, but routine maintenance can be scheduled outside the most vulnerable period.

At the same time, make sure you have a recent backup and a known recovery procedure. The backup should include files, the database and the necessary configuration. For online stores and other solutions with ongoing transactions, the plan must account for new data arriving between the backup and a failure.

Also check certificates, storage capacity, scheduled jobs and any licences the solution depends on. Small, overlooked operational tasks tend to become visible at the worst possible time.

Create a simple decision plan for the traffic peak

The capacity test should result in concrete decisions, not just a report. Describe what you will do in response to different signs of strain.

  • Which features can be simplified or temporarily disabled?
  • Can resource-intensive background jobs be postponed?
  • Can more content be delivered from the cache or CDN?
  • When should server capacity be increased?
  • When should advertising, email or other sources of traffic be slowed down?
  • Who will inform customers and internal stakeholders if problems arise?

One possible measure is to disable a resource-intensive recommendation field before affecting the checkout itself. Another may be to spread a distribution over a longer period. Such choices are easier to make when they have been discussed in advance.

Capacity is part of ongoing operations

A successful test is not lasting proof that the website can handle all future traffic. Content, software, integrations and usage patterns change. A new search feature or payment solution can shift the bottleneck without any increase in traffic.

Therefore, repeat relevant parts of the test before major campaigns, launches and significant technical changes. Compare the results with previous measurements and update the decision plan.

Professional web hosting isn't just about keeping the server running. The operating environment must deliver the most important functions at an acceptable speed when the business needs them most. A concrete traffic profile, realistic capacity test, and clear action plan provide a far better basis than hoping the hosting package is large enough.