Global Flash Sale Engine (4/4): Core Payment Integration & Distributed Idempotency

Finalizing the checkout flow. We resolve the ultimate distributed transaction nightmare: The Sweeper cancels an expired order, but Stripe reports a successful charge due to network latency. Utilizing the Saga Pattern, Idempotency Lifecycles, and Compensating Transactions.

May 25, 2026 · 15 min · Hiep

Global Flash Sale Engine (3/4): Distributed Inventory & The Hot-Row Problem

How to prevent overselling when thousands of admitted users compete for the same SKU. We shift from a naive atomic counter to a bounded-consistency reservation lifecycle using Redis Lua, inventory sharding, and transactional reconciliation.

May 16, 2026 · 15 min · Hiep

Global Flash Sale Engine (2/4): Admission Control & The Virtual Waiting Room

Auto-scaling alone cannot save you from TCP connection exhaustion. We architect a Virtual Waiting Room using Async Polling with Jitter, Edge Bot Defense, and Cryptographic Tokens to decouple traffic flow from inventory capacity.

May 9, 2026 · 8 min · Hiep

Global Flash Sale Engine (1/4): The Thundering Herd — Surviving the First Second

You don’t survive a flash sale by scaling up your database. You survive by ruthlessly shaping and dropping traffic before it reaches your core.

May 2, 2026 · 8 min · Hiep