System Design Global Flash Sale Engine · Part 4

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 · Tuan Hiep TRAN
System Design Global Flash Sale Engine · Part 3

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 · Tuan Hiep TRAN
System Design Global Flash Sale Engine · Part 2

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 · Tuan Hiep TRAN
System Design Global Flash Sale Engine · Part 1

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 · Tuan Hiep TRAN
System Design Global Payment Gateway · Part 4

Global Payment Gateway (4/4): Reconciliation & Settlement - The Architecture of Trust

Internal systems do not become correct at the API boundary; they become correct through reconciliation with external truth.

April 24, 2026 · 6 min · Tuan Hiep TRAN
System Design Global Payment Gateway · Part 3

Global Payment Gateway (3/4): The Contended Ledger - Correctness Under Concurrency

Balance is a lie; the journal is the truth. Explore how to architect a high-throughput ledger that preserves financial correctness under extreme concurrency.

April 18, 2026 · 6 min · Tuan Hiep TRAN
System Design Global Payment Gateway · Part 2

Global Payment Gateway (2/4): Distributed Transactions & The Saga Pattern

Why Two-Phase Commit (2PC) fails at scale, and how to architect the Saga Pattern and Transactional Outbox to guarantee data consistency across microservices.

April 11, 2026 · 6 min · Tuan Hiep TRAN
System Design Global Payment Gateway · Part 1

Global Payment Gateway (1/4): The Idempotent Payment API

Exactly-once delivery is an illusion in distributed networks. In this post, we architect an Idempotent Payment API to guarantee financial correctness amidst network timeouts, race conditions, and retry storms.

April 3, 2026 · 8 min · Tuan Hiep TRAN
System Design Stock Exchange Core · Part 4

Stock Exchange Core (4/4): Trade-offs, Scaling Limits & Alternative Architectures

When does the LMAX Disruptor fail? We explore the CAP theorem, quantify the brutal costs of Kernel Bypass, and provide a strict decision framework for system design.

March 29, 2026 · 5 min · Tuan Hiep TRAN
System Design Stock Exchange Core · Part 3

Stock Exchange Core (3/4): High Availability & Deterministic Fault Tolerance

How to survive hardware crashes without a database. We explore Event Sourcing, the Sequencer pattern, and UDP Multicast to achieve 99.999% uptime in a single-threaded architecture.

February 22, 2026 · 7 min · Tuan Hiep TRAN
System Design Stock Exchange Core · Part 2

Stock Exchange Core (2/4): The Single-Threaded Matching Engine

Why multi-threading kills High-Frequency Trading systems. We explore lock-free concurrency, Mechanical Sympathy, and the LMAX Disruptor pattern to achieve sub-microsecond matching.

February 20, 2026 · 7 min · Tuan Hiep TRAN
System Design Stock Exchange Core · Part 1

Stock Exchange Core (1/4): Anatomy of a Microsecond Order Book

Designing a high-frequency trading Order Book. We formalize memory layout, trace state execution, and achieve strict O(1) cancellations.

February 18, 2026 · 7 min · Tuan Hiep TRAN
System Design

Welcome to My Blog — System Design & AI Infrastructure

A personal space to explore system design, AI infrastructure, and deep reflections on the world of technology.

August 29, 2025 · 1 min · Tuan Hiep TRAN