BEAM

Seedlight BEAM: one place to run your whole eCommerce, with AI agents that know your business →

← All articles
ScalingSzymon Żynda11 min read

What Breaks at 10x Traffic: The Engineering of Scaling an eCommerce Store

When traffic suddenly spikes, a store rarely fails for a single reason. The database gives out first, then the missing cache, and finally the synchronous integrations. Here is what breaks as traffic grows and how to prepare your platform for the peak before it arrives.

At 10x traffic, an eCommerce store almost never fails for a single reason. It breaks layer by layer, in a fairly predictable order: first the database (an exhausted connection pool, missing indexes, N+1 queries, locks), then the missing cache and CDN (the server renders the same thing over and over), and finally the synchronous integrations with payment gateways, ERP or marketplaces that start responding slowly or not at all under load. The good news: every one of these breaking points is known in advance and can be reinforced before the traffic actually arrives. Scaling a store is not about buying a bigger server the night before the peak, it is about architectural decisions made earlier.

WHERE A GROWING STORE HITS THE WALLdata & ownership ceilingfeature ceilingcost ceilingstore growth →the higher you grow, the more limits you meet: first cost, then features, then data

Key takeaways

  • At 10x traffic the data layer usually breaks first: connection pool exhaustion, missing indexes and N+1 queries take down the database before you notice anything on the frontend.
  • Cache and CDN are not an optimization but a condition for surviving a peak. Rendering the same page for every visitor is waste that ends in an outage.
  • Synchronous integrations (payments, ERP, marketplace) are the most insidious bottleneck. Queues and asynchronous work decouple your store from someone else's limits.
  • Without a load test and observability, scaling is guesswork. If you do not know what broke, you do not know what to reinforce.

What breaks first, and why

Traffic growth is not linear. Ten times more visits often means a hundred times more database queries, because every page triggers its own cascade of reads. That is why a store that runs smoothly under normal load can fall over within minutes of a campaign launch or an entry into a new market. It is worth breaking this down, because the order in which things fail is almost always the same, and interventions have to be planned from the lowest layer up.

The database: first casualty of a traffic spike

The database usually fails before anything is visible on the frontend. Four things are to blame, all invisible at low traffic. The first is N+1 queries: a product listing hits the database once for the list, then separately for each product, category and price, so one view generates hundreds of queries. The second is missing indexes on the columns used for filtering and sorting, which forces the database to scan entire tables. The third is locking during concurrent writes, for example inventory updates. The fourth, the most brutal, is connection pool exhaustion: each application instance holds a limited number of connections to the database, and when they run out under load, additional users simply wait until a timeout expires. Adding more application servers at that point makes things worse, because each new server wants its own connections to the same overloaded database.

No cache or CDN: rendering the same thing over and over

If every user receives a page rendered from scratch, the server does the same work thousands of times for content that does not change. The homepage, a product page or a category listing look the same for most visitors at a given moment, yet the platform computes them every single time. Without a cache layer and without a CDN serving static assets and buffered pages close to the user, all traffic hits your origin. During a peak, this is where the most capacity is wasted. Cache is not a performance cosmetic, it is the mechanism that lifts a large share of unnecessary work off the database and the application.

Synchronous integrations as the bottleneck

The most insidious breaking point lies outside your store. If, during checkout, your application waits synchronously for a response from the payment gateway, the ERP system or a marketplace API, then your performance is a hostage to someone else's limits. When an external system slows down under load, your application threads block while waiting, the thread pool runs out, and the store stops responding even to users who are only browsing. The solution is to separate what must happen immediately (stock reservation, payment authorization) from what can wait a second or two in a queue (ERP sync, marketplace dispatch, confirmation email). Asynchronous work means a slow integration slows down a single background process, not the whole store.

Inventory and overselling

With concurrent orders for the same product, it is easy to sell more units than you actually have. Two customers see the last item, both click buy, and if checking and decrementing stock does not happen in one atomic operation, both orders go through. At normal traffic such collisions are rare and lost in the noise. At a peak they become the rule, and every case has a cost: cancellation, refund, customer support and damaged trust. This is a concurrency engineering problem, not a warehouse accounting one, and it is solved by reserving stock in a consistent transaction or queuing operations on the same SKU.

The frontend under load and the absence of observability

The frontend has its limits too. Heavy, unoptimized pages that load acceptably for a single user become slow under load, because they compete for the same server and network resources. A slower page during a peak is a real cost to conversion, which is why frontend performance has to be treated as a requirement, not an add-on. And above all of this hangs a problem worse than any single failure: the absence of observability. If you have no metrics, logs and alerts, then at the moment of a traffic spike you do not know whether the database, the cache, an integration or the frontend gave out. You diagnose blind, at the worst possible time. You cannot reinforce what you cannot see.

Practical takeaway: scale from the lowest layer up. Adding application servers when the bottleneck is the database or a synchronous integration only speeds up the outage. First take work off the origin (cache, CDN), then cut yourself off from someone else's limits (queues), and only at the end think about scaling the application horizontally.

How to prepare a store for a traffic peak

Preparing for traffic growth is engineering work done before the peak, not during it. The starting point is a real load test: simulating traffic at the level you expect, ideally well above it, run on an environment close to production. Load and stress tests are not there to show a nice green line, they are there to deliberately find the layer that breaks first and to learn the number at which it happens. Only once you know that limit do you know what actually needs reinforcing. Below are the directions that deliver the most resilience in practice.

  • Cache and CDN layers: buffer what does not change and serve static assets close to the user to take work off the origin.
  • Queues and asynchronous work: push everything that does not have to happen immediately (ERP, marketplace, emails) into queues so a slow integration does not block the store.
  • Read/write separation: route heavy reads to replicas so analytics queries and listings do not compete with order writes.
  • Frontend decoupling (headless): scale the presentation layer independently of store logic, so a peak on the frontend does not topple the backend.
  • Monitoring, alerts and performance budgets: metrics on every layer plus hard thresholds that signal you before a failure reaches customers.
LayerTypical breaking pointHow to reinforce
DatabaseN+1 queries, missing indexes, locks, exhausted connection poolIndexes and query optimization, read replicas, connection pooling, atomic transactions on inventory
Cache / CDNRendering the same content on every request, all traffic at the originPage and query caching, CDN for static assets and buffered pages
IntegrationsSynchronous calls to payments, ERP, marketplace block threadsQueues and asynchronous work, separating immediate from deferred operations, retry with backoff
InventoryOverselling on concurrent orders for the same SKUStock reservation in a consistent transaction, queuing operations per SKU
FrontendHeavy pages load slowly under loadPerformance budgets, render optimization, headless and independent presentation scaling
InfrastructureNo autoscaling, provider limits, no observabilityAutoscaling with headroom, known provider limits, monitoring, alerts and logs on every layer

A map of store layers: where things usually break at 10x traffic and how to reinforce them.

Scalability is an architectural decision, not a patch

The hardest truth about scaling is that most of this cannot be bolted on in the week before a peak. Read/write separation, headless, queues and meaningful observability are decisions made when the platform is built, because they touch its foundations. That is exactly why scalability is designed during the engineering phase, not rescued in an emergency on production. In practice, at Seedlight we approach this in two stages: we assume an architecture resilient to traffic growth already in the Engineering phase of the BEAM framework, and then we look after performance, monitoring and peak response in Maintenance and Growth. If a store has just fallen over under traffic or regularly slows down at the peak, that is often a signal deeper than a single bug: sometimes the platform has simply stopped keeping pace with the scale of the business. On how to recognize that moment, we write in our piece on the signs you have outgrown your SaaS platform.

Practical takeaway: do not just ask whether the platform will survive 10x traffic, ask which layer breaks first and at what number. A load test answers that, intuition does not. Know the limit, know the reinforcement plan. Do not know the limit, and you scale in the dark.

FAQ

What breaks first when store traffic grows 10x?

Most often the data layer. The database connection pool runs out, N+1 queries and missing indexes surface, and locks appear during concurrent writes. The database usually fails before anything is visible on the frontend, which is why scaling is planned from the lowest layer up.

Is it enough to add a bigger server or more servers?

Rarely. If the bottleneck is the database or a synchronous integration, adding application servers can make things worse, because each new server takes connections from the same overloaded database. You first have to take work off the origin with cache and CDN and cut yourself off from external limits with queues, and only then scale the application horizontally.

How can I check whether the store will survive a traffic peak before it arrives?

Through a real load test on an environment close to production. You simulate traffic above the expected peak to deliberately find the layer that breaks first and the number at which it happens. Without this, scaling is guesswork, and without observability during the peak you do not even know what exactly broke.

Why are synchronous integrations so dangerous at high traffic?

Because they make your store's performance dependent on someone else's limits. When the application waits synchronously for a payment, ERP or marketplace, and that system slows down under load, threads block while waiting and the store stops responding even to people who are only browsing. Queues and asynchronous work separate immediate operations from those that can wait in the background.

Journal

Szymon Żynda

Co-founder of Seedlight · eCommerce platforms, AI, SEO and GEO

More by this author

Newsletter

The Journal, straight to your inbox

New articles and lessons from real builds, every now and then. No spam, unsubscribe with one click.