Skip to main content
AG·SORA
Website & Digital

Year-End Promotion Traffic Spikes: Load Testing and Capacity

Published 8 min readWritten by PT Agsora Teknologi Indonesia
AG·SORA / BLOGAG·SORAWebsite & DigitalYear-End PromotionTraffic Spikes: LoadTesting and Capacityagsora.tech
In this article

The end of the year is promotion season: 12.12 campaigns, Christmas, New Year, and clearance sales. For online shops and service websites it is also when traffic can multiply within minutes. A website that feels fast on an ordinary day may not hold up when thousands of people press the buy button at once. A failure at the busiest hour is the most expensive kind, because the advertising is already paid for and disappointed customers rarely come back. This article explains how to prepare systems for traffic spikes: calculating capacity, running load tests, closing weak points, and managing the day itself.

A server rack in a data centre with indicator lights on
A promotion spike tests the whole chain, from servers and databases to third-party services.

A spike is different from growth

Traffic growth is gradual, so teams have time to adjust. A promotion spike arrives within minutes and clusters around specific moments, such as when a notification is sent or a live stream reveals prices. This pattern has three features.

  • A sharp peak: traffic can rise tenfold above the average in a short time.
  • Different user behaviour: more browsing, adding to cart, and payment than on ordinary days, so load shifts to the heaviest parts of the system.
  • Repeating users: slow pages make people press reload, so the load multiplies further.

For that reason daily averages are almost useless for planning. What you need are peak figures per minute and per second for specific functions.

Step one: set targets you can calculate

Without targets, a load test only produces charts. Build the estimate from your own business data.

  • Take the peak of the previous campaign from analytics: the highest concurrent visitors and the highest orders per minute.
  • Multiply by the growth target and the advertising budget. If the ad budget doubles, do not assume traffic only doubles; prepare a scenario of three to five times.
  • Define the critical flows: home page, product page, search, cart, checkout, payment, and order confirmation.
  • Set acceptable thresholds, for example a 95th percentile response time under two seconds for product pages and an error rate under one percent.

Record these figures in one document agreed by marketing, business, and technology. Marketing needs to know that the schedule of mass notifications affects load, and technology needs to know when and how large the campaign will be.

Step two: map the weak points

Before testing, guess where the system will break. Experience shows weak points recur in a few places.

  • Database: queries without indexes, tables locked during stock updates, and exhausted connections. A deeper discussion is in [slow database and business application performance](/blog/performa-database-dan-aplikasi-bisnis-yang-melambat).
  • Third-party services: payment gateway, shipping cost calculation, email or WhatsApp sending, and verification. If one service is slow, the entire checkout waits.
  • Sessions and carts: session storage on a single server that cannot be shared.
  • Search and filters: expensive queries that are hard to cache.
  • Background work: confirmation emails or stock synchronisation running in the same process as user requests.
  • Heavy images and scripts: product pages with large images consume bandwidth and slow everyone down.

Use existing monitoring data to mark candidates. If there is none, that is itself an important finding; see observability and error handling for business applications.

Step three: the tests to run

The term load test is often used for everything, yet there are several kinds with different purposes.

  • Baseline test: a few virtual users to learn normal response time.
  • Load test: raise the load to the peak target and hold it, to see whether the target is met.
  • Stress test: go beyond the target until the system fails, to learn the limit and how it fails. Does it fail gracefully or collapse entirely?
  • Spike test: raise load suddenly, imitating a mass notification.
  • Soak test: moderate load for several hours to find memory or connection leaks.

Open-source tools such as k6, Locust, and Apache JMeter are enough for most mid-sized businesses. More decisive than the tool is the realism of the scenario: use flows that imitate real behaviour, namely browse, view product, add to cart, check out, and pay, with varied user and product data. Hitting one URL repeatedly only tests the cache.

Safety rules while testing

  • Run on an environment that resembles production, not on live production at peak hours.
  • Use a payment gateway in test mode or a stub; never trigger real transactions or mass emails to customers.
  • Use test data, not customer data, in line with the principles in [basic security for business applications](/blog/keamanan-dasar-aplikasi-bisnis).
  • Notify your hosting or CDN provider before a large test if the contract requires it.
  • Make sure third-party services are not burdened by your test; stubs are safer.

Step four: fixes that usually matter most

After tests show the breaking points, prioritise fixes that are cheap and high in impact.

Cache and CDN

A page viewed by thousands does not need to be rebuilt every time. Cache product and category pages at the CDN and store heavy query results. Personal parts such as the cart and account stay dynamic. For images, use modern formats and sizes suited to the screen, as discussed in website speed and its impact.

Database

Add indexes to slow queries, reduce repeated queries, and move heavy reads to replicas if the architecture supports it. Size the connection pool so it does not exhaust the database limit. Avoid long locks on stock tables.

Background jobs and queues

Move email sending, notifications, and synchronisation to a queue so users do not wait. This pattern is described in event-driven architecture and message queues.

Autoscaling with clear limits

Autoscaling helps, but it is not instant and does not solve database problems. Provision starting capacity before the campaign instead of waiting for the system to react. Set an upper limit so the bill does not spike uncontrollably. Considerations for serverless approaches are in serverless and edge computing.

Virtual waiting room

For limited sales chased by thousands in the same second, a virtual waiting room is better than letting everyone in and then failing. Users receive a queue number and are released gradually according to capacity. Show an honest time estimate so people do not panic.

Stock and promotions: spikes that damage data

Technical load is not the only risk. Big promotions often cause overselling because two buyers order the last item at the same moment, or because stock in physical stores and marketplaces is out of sync. Make sure stock deduction is atomic in the database, not calculated in the application. Test the scenario of two buyers for one unit. Also review how to synchronise channels in unifying physical store and marketplace stock, and the price and coupon rules in managing promotions and discounts, because a coupon that can be reused will be drained within minutes.

Payment gateway and external services

Payment is the stage that must fail least. Check the rate limits and capacity your payment provider gives you, and tell them the campaign schedule. Make sure there are sensible timeouts and handling for when no response arrives, so customers are not charged twice and orders do not hang. Integration details are in payment gateway integration for websites and applications. Prepare fallbacks for services that can become unavailable, for example default shipping rates if the courier API is slow.

A graceful degradation plan

A good system does not have to be perfect all the time; it has to fail in an acceptable way. Decide in advance what is sacrificed first when capacity thins.

  • Turn off non-essential features: product recommendations, reviews, or advanced search.
  • Show static pages for busy categories.
  • Delay non-critical confirmation emails.
  • Limit the quantity each customer can buy.
  • Show a clear message, not a blank screen or a technical error.

These switches must be operable through feature flags without a new release, so decisions can be made in minutes. The principle matches feature flags and gradual releases.

Campaign day: command room and runbook

Even the best preparation needs readiness.

  • Freeze code changes several days before the campaign. The schedule and rules are covered in [year-end code freeze](/blog/code-freeze-akhir-tahun-manajemen-rilis-dan-jadwal-siaga-sistem-bisnis).
  • Appoint one incident lead, one dashboard watcher, and one customer spokesperson.
  • Prepare a single dashboard: orders per minute, response time, error rate, CPU and memory, database connections, and third-party service status.
  • Write a short runbook: symptoms, common causes, and the first action for each problem.
  • Agree on communication channels and escalation criteria, including when the campaign is paused.
  • Make sure the recovery plan can actually be executed; read about [disaster recovery and business continuity](/blog/disaster-recovery-dan-kesinambungan-bisnis-rto-rpo-untuk-aplikasi-bisnis).

After the campaign: learn from the data

Do not stop when the sales target is reached. Collect the real peak metrics, compare them with the estimate, and note what nearly failed. Keep the results for planning the next campaign. Also review customer complaints, failed orders, and hanging payments, then reconcile them with transaction data before closing the books.

A three-week plan

  • Week one: set the peak targets, map the critical flows, and install monitoring that is missing.
  • Week two: run load and stress tests, fix the top three weak points, and retest.
  • Week three: prepare a waiting room or graceful degradation, freeze code, rehearse the team with a simulation, and coordinate with the payment and hosting providers.
  • Campaign day: watch the dashboard, follow the runbook, and log events.
  • After the campaign: review the results and update the planning document.

Communicating with customers when the system slows

Even with solid preparation, some customers may experience delays. Prepare pre-approved messages for situations such as a long queue, a delayed payment, or sold-out stock. An honest and quick message protects trust: say what happened, what is being done, and when the next update will come. Make sure the customer service team receives a status summary every few minutes so answers stay consistent, and provide an order tracking link so customers do not need to ask one by one.

Conclusion

Readiness for traffic spikes is not about buying a bigger server. It is about knowing the limits of the system before customers find them. Set targets from your own data, test with realistic scenarios, fix the cheapest weak points, prepare graceful degradation, and train the team for the day itself. That way the advertising budget already spent actually turns into orders, not error pages.

Prepare your website and online shop for promotion season

AG·SORA helps with performance audits, load testing, database optimisation, and architecture preparation so you stay stable when traffic peaks.

Free consultation

Free checklist: choosing a software house

24 points to evaluate a vendor before you sign. Can be saved as a PDF.

Get the checklist

Ready to build a system that grows with your business?

Discuss your needs with the AG·SORA team, no cost, no commitment.