SpinTheMic
Pro

Interview practice question

Is a Redis lock safe enough?

System Design · Distributed Systems · Intermediate

Your team uses a single Redis instance with SET NX and an expiry as a lock for processing payments. What are the risks?

What a strong answer covers

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

  • Redis failover can lose the lock.
  • Expiry can release lock during long pause.
  • Two workers process same payment.
  • Use fencing or DB constraints.
  • Idempotency as the real guard.
Practise this topic

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

See all topics