...

/

Using Tooz Locking Abstraction

Using Tooz Locking Abstraction

Learn about Tooz locking abstraction in Python.

We'll cover the following...

Picking the right distributed lock mechanism once and for all for your application is not necessarily an obvious choice. Consider these factors:

First, some solutions are heavier than others to deploy and maintain. For example, installing a memcached server is pretty straightforward, but maintaining a ZooKeeper cluster is much more complicated. Clearly, the two solutions are not strictly equivalent in terms of safety and guaranteed operation. However, as a developer, it might be handy to test using a small backend and operate at scale with a scalable backend.

Secondly, it is not always obvious which solution to pick. A few years ago, ZooKeeper was the hot thing and the only widely available implementation of the Paxos algorithm. Nowadays, solutions such as etcd and its Raft implementation are getting more traction: the algorithm is simpler to understand and the project is less complicated to deploy and operate.

All those backends offer different levels of abstraction on top of distributed features. ...