SpinTheMic
Pro

Interview practice question

Global counter becomes a bottleneck

System Design · Scalability · Experienced

Your system increments a single global counter for every order, and it caps throughput at 2,000 orders per second. How do you remove the bottleneck?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Single row = lock contention.
  • Shard the counter into N rows.
  • Sum shards on read.
  • Or local counters with periodic merge.
  • Ask if exact real-time value is needed.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics