Get the latest tech news
Consistency over Availability: How rqlite Handles the CAP theorem
rqlite is a lightweight, user-friendly, open-source, distributed relational database. It’s written in Go and uses SQLite as its storage engine. When it comes to distributed systems the CAP theorem is an essential concept. It states that it's impossible for a distributed database to simultaneously provide Consistency, Availability, and Partition tolerance. The challenge is in the face of a network partition,…
While rqlite is fundamentally a CP system, it gives you fine-grained control over the C and A trade-off through its selectable read consistency levels: weak, linearizable, strong, and none. However, with weak, there is a very small window of time where a node may think it’s the leader after it’s been deposed, and a write has taken place, potentially resulting in a stale read. None: Max Speed, (Almost) Zero Guarantees With none consistency, the node receiving the read request simply queries its local SQLite database without any Leadership or cluster-connection checks.
Or read this on Hacker News