Back to blog
Engineering

Surviving Black Friday: lessons from headless commerce at scale

Marcus Lee·Principal EngineerMay 21, 20267 min read

Peak traffic is a stress test for your entire stack. Here's how a headless storefront held nine times its normal load — and the four architectural decisions that made it uneventful.

Black Friday does not create new problems. It amplifies the ones you already have. A query that runs in 300ms at normal load and never appears on a dashboard becomes a site-wide outage at nine times traffic, because the thing that saved you every other day of the year was idle headroom you no longer have.

Preparing for peak is therefore not about adding capacity on the day. It is about removing single points of failure in the months before, and knowing precisely which parts of your stack are allowed to be slow. This is the architecture that carried one storefront through a 9× spike with zero dropped orders — edge rendering, a fiercely protected checkout path, and a team that had already rehearsed the failure.

Render at the edge

A headless, edge-rendered storefront means the pages your customers hit are served close to them and cached aggressively. Your origin only does the work that genuinely can't be cached — pricing, inventory, and checkout.

That separation is what let the storefront absorb the spike. Marketing pages never touched the database.

Protect the checkout path

Everything funnels toward checkout, so we treat it as sacred. Inventory checks are optimistic with a reconciliation step, payment calls have tight timeouts and retries, and the order write is idempotent so a nervous double-click never creates two orders.

Rehearse the failure

The last lesson is cultural: load-test against production-like data and practice your incident response before the day. When something did wobble at peak, the on-call team had already seen it in a drill and knew exactly which lever to pull.

ML

Marcus Lee

Principal Engineer, Gbooks

See what Gbooks can do for your team

Book a tailored demo and we'll walk you through the platform on a workflow that looks like yours.