Databases · Senior · Question 15 of 75

Why is a distributed lock in Redis (e.g. Redlock) not enough on its own to protect data correctness?

Explanation

Locks with timeouts are fine for efficiency (avoiding duplicate work). For correctness, the resource must reject writes with an older token, or use database transactions and constraints.

Further reading

Problem with a question

Databases · Senior · question 15

Test yourself

Take the Databases · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz