Using Distributed Locking To Solve Race Conditions (and why a simple solution works better)

Using Distributed Locking To Solve Race Conditions (and why a simple solution works better)

18.987 Lượt nghe
Using Distributed Locking To Solve Race Conditions (and why a simple solution works better)
Want to master Clean Architecture? Go here: https://bit.ly/3PupkOJ Want to unlock Modular Monoliths? Go here: https://bit.ly/3SXlzSt Join a community of 1000+ .NET developers: https://www.patreon.com/milanjovanovic Ever wondered how email services ensure each user has a unique email address, even under heavy load? Dive into the world of email uniqueness, concurrency challenges, and the role of distributed locking in maintaining data integrity. This video demystifies the technical complexities behind guaranteeing email uniqueness in a distributed environment. Check out my courses: https://www.milanjovanovic.tech/courses Read my Blog here: https://www.milanjovanovic.tech/blog Join my weekly .NET newsletter: https://www.milanjovanovic.tech Chapters 0:00 Explaining Race Conditions 2:43 Using the lock statement 3:13 Using a Semaphore (Mutex) 5:17 Distributed Locking - Postgres advisory lock 9:01 Domain model and uniqueness 10:08 Unique index, handling database exceptions