[System Design] Chapter 2: Flash Sale Engine - Solving Overselling and Hot Keys (opens in new tab)
• 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. 1. The Hot Key Problem and Two-Tier Caching A highly discounted product is known as a Hot Key. Many developers mistakenly be...
Read the original article