Your question is Design Distributed Locking with Redis. Take a moment with it on the right.
Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).
Design distributed locking using Redis.
Asked in the PS/DS + HLD round stage. Explain how clients acquire, renew, and release locks safely, and how the design behaves when clients, Redis nodes, networks, or processes fail. Discuss correctness guarantees, expiration, ownership, retries, observability, and the tradeoffs between a single Redis primary, Redis Sentinel, Redis Cluster, and Redlock. Include pseudocode or API-level details for the critical operations.