/plushcap/analysis/datastax/datastax-consensus-cassandra

Consensus on Cassandra

What's this blog post about?

Consensus in distributed systems is crucial for maintaining agreement among peers on the value of shared data. The Paxos protocol is used by Cassandra since version 2.0 to support consensus. Lease tables can be created in Cassandra to track owners of things, providing a leader election algorithm and a mental model that developers can easily understand. A lease has a name, optional value, owner, and a default TTL for fail-safe purposes. Clients acquire leases by issuing statements and periodically renew them using CQL. When the client no longer needs the lease, it can be explicitly dropped with another CQL statement. This approach allows for leader election of things, distributed locks, and distributed sequences to be built on top of Cassandra.

Company
DataStax

Date published
Dec. 1, 2014

Author(s)
Jake Luciani

Word count
572

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.