Tagged articles
overselling
10 articles · Page 1 of 1
This article explains how Kubernetes uses CPU requests and limits to implement overselling, detailing the underlying Linux cgroup mechanisms, bandwidth throttling, weight‑based scheduling, and practical configuration tips for SREs to balance guaranteed resources with maximum usage.
CPU schedulingKubernetesResource Limits
0 likes · 16 min read

To prevent overselling during flash sales, the article explains how non‑atomic database updates cause negative stock and presents solutions such as optimistic DB locking, Redis Lua atomic deductions, Redisson distributed locks, transactional message queues, and pre‑deduction with rate limiting, recommending a combined approach that achieved 120 000 QPS with zero oversell.
Distributed LockOptimistic Lockinventory management
0 likes · 7 min read

This article explains why inventory overselling occurs during massive sales events, analyzes the root causes such as non‑atomic database operations, and presents practical solutions—including optimistic locking, Redis atomic scripts, distributed locks, message‑queue peak shaving, and pre‑deduct strategies—while highlighting common pitfalls and best‑practice combinations for robust e‑commerce back‑ends.
Redisdistributed-lockecommerce
0 likes · 9 min read

This article explains several common technical solutions—locking queues, update‑statement limits, optimistic locking, temporary tables, and Redis pre‑stocking—to prevent inventory overselling, comparing their suitability for different concurrency levels and recommending the best approach for high‑traffic scenarios.
ConcurrencyInventoryecommerce
0 likes · 5 min read

This article explains how to prevent overselling in high‑concurrency scenarios by using Redis‑based distributed locks in PHP, detailing initialization, lock acquisition with setnx, unlocking with del, and providing complete sample code along with best‑practice considerations.
Distributed LockPHPRedis
0 likes · 4 min read

This article analyzes a real‑world flash‑sale incident where a Redis distributed lock expired under high concurrency, leading to massive overselling, and presents safer lock implementations, atomic stock checks, and architectural improvements to prevent similar failures.
ConcurrencyJavaRedis
0 likes · 11 min read

A flash‑sale of 100 bottles of a scarce product oversold due to an unsafe distributed‑lock implementation, leading to a P0 incident; the post analyzes the root causes, shows flawed Java/Redis code, and presents safer lock and inventory‑check solutions.
ConcurrencyDistributed LockJava
0 likes · 10 min read

This article analyzes a real‑world flash‑sale overselling incident caused by unsafe Redis distributed locks, explains the root causes such as lock expiration and non‑atomic stock checks, and presents safer lock implementations and atomic stock decrement strategies to prevent future overselling.
JavaRedisoverselling
0 likes · 12 min read

This article analyzes a real‑world overselling incident caused by an unsafe Redis distributed lock in a high‑traffic flash‑sale service, explains the root causes, and presents safer lock implementations, atomic stock checks, and architectural improvements to prevent similar failures.
JavaRedisoverselling
0 likes · 12 min read

The article explains why overselling occurs in flash‑sale systems under high concurrency, analyzes the drawbacks of pessimistic locking and FIFO queues, and presents optimistic locking with version control as a more efficient solution for ensuring thread‑safe inventory updates.
BackendFIFO QueueOptimistic Lock
0 likes · 5 min read
