Grokking Redis
Vote

0% completed

​

4.5 Distributed Locks

What breaks if two processes both believe they hold the same lock at the same moment? Inside one process, the question rarely comes up, because the operating system guarantees that only one thread holds a mutex. Across many machines there is no shared memory, clocks disagree, processes pause without warning, and networks drop or delay messages.

A distributed lock tries to provide mutual exclusion anyway. It can provide something useful, but less than many engineers assume, and the answer to the opening question decides which design you need. This lesson follows one lock, `lock:order:42

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content