Nerd For Tech
Published in

Nerd For Tech

Leases & Fences— Distributed Design Patterns

Ensuring consistency of critical data for which we want to have exclusive access, can be achieved through locking. However, in a distributed setup, we can run into scenarios where because of a network partition, process pauses or nodes go down. This leads to the resources being locked indefinitely!

To overcome the above problem, we make use of leases.

Leases are time-bound locks, where the locks are automatically released by the system managing them after a timeout.

--

--

NFT is an Educational Media House. Our mission is to bring the invaluable knowledge and experiences of experts from all over the world to the novice. To know more about us, visit https://www.nerdfortech.org/.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Pratik Pandey

Senior Engineer with experience in designing and architecting large scale distributed systems.