HardDesign: Distributed Task Scheduler (Cron at Scale)

What Redis command is used to implement a distributed lock for exactly-once task execution?

Tests your understanding of this concept.

Answer Options

AINCR lock:task_id
BSETNX lock:task_id worker_id (SET if Not eXists)
CLPUSH lock:queue task_id
DSUBSCRIBE lock:task_id

Want to see the correct answer?

Get the answer with a detailed explanation, plus practice 22+ more Design: Distributed Task Scheduler (Cron at Scale) questions with adaptive quizzes and timed interviews.

See the Answer on Guru Sishya →

This question is from the Design: Distributed Task Scheduler (Cron at Scale) topic (System Design Cases).

More Design: Distributed Task Scheduler (Cron at Scale) Questions