SpinTheMic
Pro

Interview practice question

Caching view counts

System Design · Caching · Intermediate

A video platform increments view counts millions of times per minute. Writing each view to the database is too much. How would you use caching?

What a strong answer covers

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

  • Increment counters in Redis (INCR).
  • Flush to DB periodically in batches.
  • Accept small loss risk.
  • Sharded counters for viral videos.
  • Display cached count.
Practise this topic

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

See all topics