Miaosha
Design and implementation of flash sale system
Miaosha is a high-concurrency “flash sale” (秒杀) demo that explores how to design a backend capable of withstanding extreme, bursty traffic during limited-time events. It illustrates patterns like cache-first reads for hot data, request rate limiting, and asynchronous order processing to protect databases under load. The project demonstrates stock deduction strategies designed to avoid overselling, combining pre-decrement in cache with reliable persistence and message-driven confirmation....