Code RoomLock contention limits throughput
HardPrep Room Coding #2852

Lock contention limits throughput

On-callConcurrencyDistributed systemsSenior–Staff~30 min

Your inventory-reservation service scaled its stateless workers from 10 to 50 to handle a sale, but throughput on the hot SKUs plateaued and latency rose. Every reservation takes a per-SKU distributed lock (Redis Redlock-style) to prevent overselling. Tracing shows workers spending most of their time waiting to acquire the lock for a handful of popular SKUs, and lock wait time grew roughly linearly as you added workers. CPU is low everywhere. How do you triage and what's the durable fix?

What a strong answer looks like

Stop the bleeding first (mitigate), then form hypotheses from real signals. Separate root cause from symptom, communicate status as you go, and close with what prevents a repeat.

0:00 of about 30 min
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.