Company
Date Published
Author
Karthik Ranganathan
Word count
2789
Language
English
Hacker News points
None

Summary

YugabyteDB is inspired by the Google Spanner architecture, which was designed to power geo-distributed, random access OLTP workloads. The database's logical architecture consists of two layers: the upper Yugabyte Query Layer (YQL) and the lower DocDB document store. DocDB is a high-performance distributed document store that offers strong consistency semantics, including single-row linearizability and multi-row ACID transactions. It uses Raft consensus algorithm to ensure fault-tolerant data replication across multiple nodes. The database's sharding strategy allows for transparent sharding of tables into tablets, which are replicated across multiple nodes. DocDB also supports leader leases to ensure that reads are served by the latest leader, and it uses Hybrid Logical Clocks (HLC) to track causal relationships between operations. The database provides a document-based persistence model, where each row is persisted in a local document store using a customized version of RocksDB. YugabyteDB aims to bring the Google Spanner architecture to life in an open-source, cloud-native infrastructure while retaining high-performance characteristics and reusing PostgreSQL's query layer.