This series explores the core architectural patterns and technologies Shopee uses to handle millions of concurrent users, specifically focusing on extreme traffic spikes during Flash Sales and mega-campaigns like 11.11.

Series Contents

Chapter 5: Observability - Finding Bugs in the Microservices Jungle

← Series hub ← Prev Chapter 5: Observability - Finding Bugs in the Microservices Jungle Imagine you are an on-call engineer during the 11.11 mega-sale. Suddenly, alerts go off: Checkout success rates are plummeting, and users are facing continuous Timeouts. In an old Monolithic system, you would simply open error.log and find the exact broken line in the pay() function. However, at Shopee, the lifecycle of a single “Checkout” button press jumps across 30 different services: API Gateway -> Order Service -> Promo Service -> Inventory Service -> Payment Service -> Banking Gateway... ...

May 5, 2026 · 3 min · Lê Tuấn Anh

Shopee Database Architecture: MySQL Sharding to TiDB NewSQL Migration at Scale

← Series hub ← Prev • Next → Chapter 4: Database Scale - The Rise of TiDB and NewSQL No matter how many layers of Cache or Message Queues you have, the final destination of all transactional data is the Database (the Source of Truth). With tens of millions of daily orders and billions of records, traditional RDBMS like standalone MySQL quickly hit dangerous bottlenecks. The B+Tree index grows too deep, and Disk IOPS reach their physical ceiling. ...

May 5, 2026 · 4 min · Lê Tuấn Anh

Chapter 3: Traffic Shield - Peak Shaving with Kafka and Graceful Degradation

← Series hub ← Prev • Next → Chapter 3: Peak Shaving - The Power of Apache Kafka and Graceful Degradation In Chapter 2, we utilized Redis to deduct inventory in a fraction of a millisecond. However, the purchase journey isn’t over. The system still needs to: Create the order record in MySQL, generate an invoice, deduct money from ShopeePay, calculate shipping, and award Shopee Coins. If we attempt to perform all these steps Synchronously while the user waits, the system will collapse due to database lock timeouts or slow third-party API responses. The secret is: Asynchronous Processing. ...

May 5, 2026 · 3 min · Lê Tuấn Anh

Chapter 2: Flash Sale Engine - Solving Overselling and Hot Keys

← Series hub ← Prev • Next → Chapter 2: Flash Sale Engine - The Mystery Behind Redis and Hot Keys Flash Sale events are the ultimate stress test for system architecture. When an iPhone is sold for $1, millions of users will smash the “Buy Now” button in the exact same millisecond. If this massive spike hits a MySQL database directly, the system will instantly crash due to Row Locks and Deadlocks. ...

May 5, 2026 · 4 min · Lê Tuấn Anh

Chapter 1: Microservices Foundation - The Power of Go, gRPC, and API Gateway

← Series hub Next → Chapter 1: Building a Massive Foundation with Microservices, Golang, and gRPC In the first part of our Shopee architecture series, we dive deep into their foundational layer. To serve millions of concurrent users (high-concurrency), a Monolithic architecture is impossible. A single bottleneck would bring down the entire system. The mandatory solution is the Microservices Architecture. 1. Why Did Shopee Choose Golang? While Java remains traditional for Enterprise systems, Shopee selected Golang (Go) for the vast majority of its core backend services. ...

May 5, 2026 · 3 min · Lê Tuấn Anh