System Design · Discord · Hard
You are given $$N$$ stateless service instances, each executing the same code. At any moment, at most one of them may act as leader and perform a singleton responsibility — such as driving a scheduler, serving as the only writer to a partition, or consuming from a queue. The remaining instances are followers waiting to take over if needed. Design a lease-based leader-election protocol using Redis for coordination. You may assume one primary Redis endpoint for this exercise.…
Checking your access…