[CockroachDB Internals #3] Data Structures and Algorithms are crucial in the real world and here’s an example ⚡
CockroachDB, a highly available Distributed SQL database, uses a variety of Data Structures and algorithms to provide guarantees. Here are a few of them
-
B+ Trees: CockroachDB uses B+ trees to index its data and provide efficient access to it. The B+ trees are used to organize the data on disk and provide fast lookup and range queries.
-
Raft consensus algorithm: CockroachDB uses the Raft consensus algorithm to ensure consistency and availability of data across multiple nodes in a cluster.
-
Distributed hash tables: CockroachDB uses distributed hash tables to route data to the appropriate nodes in the cluster. Each node in the cluster is responsible for a portion of the hash table, which allows for efficient data distribution and retrieval.
⚡ Out of these 3, I have explained 2 on my YouTube Channel, give it a watch and subscribe
- Why do databases use B+ Trees - youtu.be/09E-tVAUqQw
- Kademlia - a Distributed Hash Table - youtu.be/_kCHOpINA5g
⚡ Recently, I started diving deep into CockroachDB internals and will share my learning in public. So, if you find it amusing, follow along.