Get the latest tech news

Distributed Locks with Redis (2014)


A distributed lock pattern with Redis

We are going to model our design with just three properties that, from our point of view, are the minimum guarantees needed to use distributed locks in an effective way. In our examples we set N=5, which is a reasonable value, so we need to run 5 Redis masters on different computers or virtual machines in order to ensure that they’ll fail in a mostly independent way. Basically, the algorithm safety is retained as long as when an instance restarts after a crash, it no longer participates to any currently active lock.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of redis

redis

Photo of locks

locks

Related news:

News photo

Rust Atomics and Locks (2023)

News photo

The Deadlock Empire: An Interactive Guide to Locks

News photo

P2PInfect botnet targets REdis servers with new ransomware module