SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
1.
Distributed Locking in Kubernetes
Rafał Leszko
@RafalLeszko
rafalleszko.com
Hazelcast
2.
About me
● Cloud-Native Team Lead at Hazelcast
● Worked at Google and CERN
● Author of the book "Continuous Delivery
with Docker and Jenkins"
● Trainer and conference speaker
● Live in Kraków, Poland
3.
About Hazelcast
● Distributed Company
● Open Source Software
● 140+ Employees
● Products:
○ Hazelcast IMDG
○ Hazelcast Jet
○ Hazelcast Cloud
@Hazelcast
6.
Reasons for Distributed Locking
● Efficiency
○ prevent executing the same work more than once, e.g.,
performing some expensive calculation
○ failing lock results in some additional costs or some
inconvenience
● Correctness
○ prevent data corruption, data loss, inconsistency
○ failing lock results in some serious problems with the
system
67.
Libraries for Kubernetes Native Distributed Locking
● Lockgate: cross-platform locking library with distributed locks
using Kubernetes
● Kube-lock: simple library that implements a distributed lock
using annotations on a Kubernetes resource
88.
Resources
● Code for this presentation:
https://github.com/leszko/distributed-locking
● How to do distributed locking:
https://martin.kleppmann.com/2016/02/08/how-to-do-distrib
uted-locking.htm
● Distributed Locks are Dead; Long Live Distributed Locks!
https://hazelcast.com/blog/long-live-distributed-locks/