Live Commerce

Live commerce platform architecture under peak load

Live commerce platforms break in the same places under load. Here is the architecture LNOKS uses and a 1.5-second latency budget for checkout from the stream.

Nazar Mysholivskyi, Co-founder and CEO Updated 6 May 2026 2 min read
Illustration of a live commerce stream with 38,000 concurrent viewers, live chat and a buy now button

Live commerce platforms break in the same places when a stream draws a large audience: the video encoder falls behind, chat cannot keep up with the message rate, and many viewers try to buy the same item at the same moment. This article sets out the architecture LNOKS uses for live shopping platforms and why it holds up under load. It covers the latency budget between the stream and checkout, single-flight inventory reservation that prevents overselling without slowing every order, a chat layer that holds no state so it can run across many servers, and why CDN-backed HLS is still the right default for the stream itself.

TL;DR

Key takeaways

  • Three failure cliffs dominate live commerce under heavy load: encoder backpressure, chat fan-out, and inventory race conditions during burst checkout.
  • Treat 1.5 seconds from tap to confirmed order as the design budget for checkout from the stream.
  • Single-flight inventory reservation (not optimistic locking) prevents oversells without serializing the entire checkout path.
  • Chat must hold no state and run across many servers, because every message has to reach every viewer during a peak drop.
  • CDN-backed HLS with 4-second segments is the right default. Sub-second protocols (LL-HLS, WebRTC) are real but operationally heavy below 50K concurrent.

The three cliffs of live commerce under heavy load

Up to roughly 2,000 concurrent viewers, almost any architecture works. Past 10,000, three specific failure modes show up reliably. Encoder backpressure when an audience surge outpaces ingest capacity. Chat fan-out melting because every message must reach every viewer. And — the one nobody warns you about — inventory race conditions when a flash drop produces a thousand near-simultaneous buy taps on the same SKU.

Vernox inventory dashboard on a laptop with total products, warehouses, stock value and recent stock movements

The latency budget

Treat 1.5 seconds from tap to confirmed order as the design budget for checkout from the stream. The budget breaks down roughly:

Sub-1.5s checkout breakdown
StageBudgetNotes
Tap → API request~150msMobile network jitter dominates
Inventory check + reservation~300msSingle-flight is critical here
Payment authorization~600msStripe/Adyen adds the floor
Order confirmation broadcast~250msBack to viewer + chat
Buffer for spikes~200msHeadroom, not theoretical

Single-flight inventory reservation

Optimistic locking falls over under burst load. The pattern that actually holds up is single-flight reservation: a Redis-based lock per SKU with a short TTL, behind which only one reservation request runs at a time. Latecomers either join the same reservation or queue. The lock TTL has to be short — under 200ms — or the queue collapses into a stampede.

Chat is a fan-out problem

During a peak drop, a large audience posts at once, and every message has to reach every viewer. Chat must be stateless on the message path. The pattern: receive on the API, validate in 5ms, fan out via a pub/sub layer (we've used both Redis Streams and Cloudflare Durable Objects depending on regional split). Persist asynchronously for moderation; never block on persistence.

  • No database write on the message path. Persist async for moderation only.
  • Per-room sharding with consistent hashing — same room, same shard.
  • Server-sent events (not WebSocket) for read-only viewers; cuts connection memory ~3x.

Stream protocol: HLS is still the right default

LL-HLS and WebRTC promise sub-second latency. They also raise operational complexity sharply — encoder farm sizing, edge POP coverage, fallback paths. Below 50K concurrent, CDN-backed HLS with 4-second segments delivers a 6–10s glass-to-glass latency that's acceptable for most live commerce formats. Above that, the math changes. Below it, the engineering cost rarely justifies the protocol switch. Instrument first and switch protocols second, so you can measure conversion before and after.

What we ship in week one

On a live commerce build, the first week covers three checks: load test the inventory reservation path well above projected peak, instrument full latency from the viewer device, and confirm the chat fan-out can handle the projected message rate. If any of the three fails, the architecture changes before product work starts.

Before you enquire

Frequently asked questions

Miraya Live took 4 months from kickoff to the first release, including a separate discovery phase, design, and the web and mobile builds. Your timeline depends on the roles, platforms and integrations you need, and discovery gives you a scoped plan and estimate.

Plan the architecture for 10x your projected peak. If your business case projects 3K concurrent in year one, design for 30K. The cost differential during build is small; the cost of re-architecting under load after a viral moment is enormous.

No. Mux, Cloudflare Stream, and AWS IVS all ship production-grade ingest + delivery. The custom work is everything around the stream — checkout, chat, inventory, analytics, host tooling. Buy the video, build the commerce.

Single-flight inventory reservation in Redis with a short TTL, surfaced as either "Added to cart" or "Sold out" within 300ms. Optimistic locking under burst load consistently produces oversells; distributed transactions are too slow. Single-flight is the working pattern.

Three engineers — one full-stack lead, one mobile (iOS first), one infra/realtime — plus a product lead who has hosted at least one live commerce stream. The product perspective from the host side is non-negotiable.

Need help with live commerce?

Tell us where you are. We reply within one business day.

Steps to kick-off: intro call, business deep dive, proposal and discovery phase