A gem for distributed locking based on Google Cloud Storage
I wrote a gem for distributed locking based on Google Cloud Storage. It can be used for ensuring mutual exclusion in workloads that span multiple machines. I use this for ensuring mutual exclusion in Fullstaq Ruby’s Github Actions pipeline.
Before writing this library I spent quite some time in designing the algorithm, addressing caveats (particular all the dangers that could happen outside the happy path) and ensuring correctness. I blogged about this some time ago.
Compared to Redis-based locks (such as Redlock), this library is safer because it addresses the critiques documented by Martin Kleppmann.
Post a comment