Application and Network Security

Infrastructure readiness for e-commerce peak periods (campaigns)

Nanda Teknoloji Engineering Team · · 7 min read

In brief

Preparing for a campaign period means planning capacity against a real traffic forecast, moving load to the edge with caching and a CDN, load testing, enabling WAF and bot protection in advance, and having monitoring and a rollback plan ready. What matters is completing these weeks before the campaign.

In e-commerce, a campaign period exposes the weak points of the infrastructure that are invisible on normal days. Proper preparation comes down to five headings: planning capacity against a real traffic forecast, moving load to the edge with caching and a CDN, finding bottlenecks in advance through load testing, enabling WAF and DDoS protection before the campaign, and keeping monitoring and a rollback plan ready. The key to success lies not in the order but in the timing: all of this work must be finished weeks before the campaign, because every change made in the final days is a risk in itself. Below are a preparation timeline, a checklist, and commonly made mistakes.

Why is campaign traffic different from normal traffic?

Campaign load is not just “more visitors”; the load profile changes.

  • Sudden spikes. The moment a notification or ad goes live, traffic rises within minutes; gradual scaling is faster than the team’s reaction time.
  • Conversion intensity. The share of operations that cannot be cached and involve database writes, such as cart, checkout, and stock queries, increases.
  • Bot traffic. Limited-stock products attract bots; price scrapers and automated purchase attempts consume capacity.
  • Third-party dependencies. The capacity of the payment provider, shipping integration, and SMS and email services is not under your control.
  • Attack opportunism. Busy days are also attractive to those who want to disrupt service; DDoS types take on particular importance in this period.

Preparation timeline

Time Focus Output
6-8 weeks before Target traffic and workflow forecast, architecture review Capacity targets, bottleneck list
4-6 weeks before Caching and CDN strategy, WAF/bot rules, scaling design Protection and caching layer in place
2-4 weeks before Load testing, fixes, second test round Test report, capacity approval
1-2 weeks before Change freeze, monitoring dashboards, drill Response plan, on-call schedule
Campaign day Live monitoring, fast decisions Incident log
Afterward Evaluation and scaling back Improvement list

Capacity planning: where to start?

The capacity estimate rests on past campaign data and business unit targets. Instead of making up a number, answer these three questions: What is our concurrent user target? Do we know how many operations these users perform (search, add to cart, checkout)? Which component saturates first?

Think about the layers separately:

  1. Web and application tier. For horizontal scaling, the application needs to run stateless. Session information should be kept in a shared store.
  2. Database. It is the source of most campaign outages. Read replicas, connection pool limits, indexes, and slow queries should be examined in advance.
  3. Caching layer. Frequently read product, category, and price data can be held in an in-memory cache.
  4. Storage and network. On image-heavy sites, egress bandwidth and object storage read capacity can be limiting.
  5. Cloud resources. For flexible capacity needs, temporary scale-up for the duration of the campaign can be planned in a cloud server environment; verify the scaling time with a test.

Moving load to the edge: CDN and caching

Most campaign pages (images, styles, scripts, category lists) are the same for everyone and can be cached. A properly configured CDN serves a significant portion of the requests that would go to the origin server at the edge. Practical steps:

  • Give static assets a long TTL and versioned file names.
  • Cache the campaign landing page for a short period (seconds to minutes); prepare a purge plan for content updates.
  • Remove tracking parameters from the cache key.
  • Exclude cart, checkout, and account pages from the cache.
  • Open the origin only to traffic coming from CDN addresses.

You can find the working logic of a CDN in detail in our what is a CDN article.

Load testing: what to test, and how?

Load testing generates the expected traffic with realistic user behavior and shows at what point the system breaks.

  1. Write realistic scenarios. Not just the home page; mix search, product detail, cart, and checkout flow at real ratios.
  2. Test in the same structure as production. A small test environment gives misleading results.
  3. Try gradual and sudden increases separately. A sudden spike reveals scaling delay.
  4. Include or simulate dependencies. Know the payment provider’s limits; follow the provider’s rules for the test environment.
  5. Record the failures and fix them. A second test round proves the fixes worked.
  6. Measure endurance. Long-duration load as well as short peak load shows memory leaks and connection buildup.

Security: bots and attack traffic during a campaign

Protection layers should be turned on not on campaign day but beforehand, and tested. Run WAF rules in monitoring mode early and weed out false positives; otherwise an exception in the checkout flow cuts campaign revenue. For bot management, put rate limiting and challenges on login, cart, and stock query endpoints. For volumetric attacks, network edge mitigation and escalation contacts should be settled in advance. The concept of bot management is also worth examining separately in this context.

Campaign day checklist

  • Monitoring dashboard: request rate, error rate, response time, database connections, payment success rate.
  • On-call schedule and escalation phone numbers shared.
  • Change freeze in effect; no releases other than emergency patches.
  • Maintenance page and “queue/waiting room” option ready.
  • Cache purge procedure rehearsed.
  • Third-party communication channels (payment, shipping, SMS) open.
  • Customer service briefed on a possible slowness message.

A scenario: an unexpected bottleneck on the checkout page

A store runs its pre-campaign load test only on the home page and product list; the results are good. When the campaign begins, order volume rises as expected, but timeouts appear at the checkout step. The investigation shows that each order uses a database query that locks the same rows for stock decrement. On a popular product, hundreds of concurrent operations queue up. A more realistic load test would have made this problem visible weeks earlier. The fix is to split the stock decrement into short transactions, use separate stock reservation for popular products, and test the checkout flow with its own capacity target.

After the campaign: what should be done?

The work does not end when the campaign ends. Shutting down temporarily scaled-up resources is necessary for cost control. Incident logs, moments of slowdown, and customer complaints are brought together and a short review is written: what worked as expected, what did not, which decision came late? This document becomes the starting point for the next campaign. Rules in WAF and bot configurations that produced false positives are recorded, and indicators such as cache hit ratio and payment success rate are compared against the baseline. In this way each campaign reduces the forecasting error of the next.

Common mistakes

  • Making changes on the last day. Without a pre-campaign code and configuration freeze, the risk of unexpected errors rises.
  • Forgetting the database. Scaling the web tier and leaving the database fixed just moves the bottleneck.
  • Running the load test in a single round. It is not verified that the problems found were fixed.
  • Caching what should not be cached. Caching a personalized page is a serious data breach.
  • Turning on protection on campaign morning. False positives appear at the most expensive moment.
  • Having no rollback plan. A new release must be able to be rolled back quickly.
  • Neglecting the post-campaign period. Temporary capacity is not shut down, and lessons learned are not written down.

Decision summary

Question If yes
Did slowdowns occur in previous campaigns? Do database and slow query analysis first
Does traffic spike suddenly? Consider pre-warmed capacity and a waiting room
Is static content dominant? Prioritize CDN and caching
Are bots and stock hoarding seen? Add bot management, rate limiting, and challenges
Is the in-house team limited? Get managed operations support for the campaign period

Moving forward with Nanda Teknoloji

Nanda Teknoloji carries out the discovery, design, migration, and operation steps in projects like these: capacity and bottleneck analysis, designing the CDN and protection layers, testing, and monitoring during the campaign period. You can explore our cloud server solution for flexible capacity, CDN for edge performance, and WAF and DDoS protection for protection.

Frequently asked questions

When should campaign preparation start?

Because the capacity, testing, and change freeze steps take time, preparation should start weeks before the campaign. Changes made on the last day create new risk.

Is autoscaling enough?

Not on its own. If the database, session store, and third-party dependencies do not scale too, the bottleneck just moves. Scaling delay may also require pre-warming for sudden spikes.

Should load testing be done in production?

Where possible, it is done in a test environment with the same structure as production. If testing will be done in production, it should be planned in a controlled, monitored, and reversible way.

Why is bot traffic a problem during a campaign?

Bots that hoard stock and scrape prices consume the same resources as legitimate users. Without bot management and rate limiting, the real customer experience can degrade.

Related solutions

Related posts

Let's plan your critical systems together

Tell us what you need; our team will work out the right architecture and migration path with you.