Advanced System Design Fundamentals
0% completed
Distributed Locks Done Right
02:00:00 server-a lock taken seller=812
02:00:30 server-b lock taken seller=812
02:00:31 server-b payout sent seller=812 amount=$500
02:01:05 server-a payout sent seller=812 amount=$500
These four lines come from the payout job of a marketplace, which pays its sellers once a day. The job runs on three servers. Each seller has a lock, so that two servers never pay the same seller. Yet two servers took the lock for seller 812, and each paid $500. Neither server logged an error, and the lock code had no obvious bug.
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%