Advanced System Design Fundamentals
0% completed
Distributed Locks Done Right
1. Ask Why You Want the Lock
Before any discussion of algorithms, one question decides everything that follows, and skipping it is how most of these designs go wrong.
- A lock for efficiency exists so the same work is not done twice. Two workers generating the same report, two jobs warming the same cache. If the lock fails you spend money and time, and nothing is damaged.
- A lock for correctness exists so two actors cannot act at once. Two processes writing the same file, two workers moving the same money. If the lock fails, data is corrupted.
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%