YugabyteDB is a high-performance transactional distributed SQL database for cloud-native and geo-distributed applications. YugabyteDB is consistent and partition tolerant. It supports distributed ACID transactions, auto-sharding, and auto-balancing. Besides PostgreSQL-compatible SQL API, it supports the Apache Cassandra Query Language (CQL). [05][06][07][08][09]
- Website
- https://www.yugabyte.com[01]
- Source Code
- https://github.com/yugabyte/yugabyte-db[02]
- @Yugabyte
- Developer
- Country of Origin
- US
- Start Year
- 2016 [29]
- Project Types
- Commercial, Open Source
- Written in
- C++
- Derived From
- PostgreSQL, RocksDB
- Inspired By
- Cloud Spanner
- Compatible With
- Cassandra, PostgreSQL, Redis
- License
- Apache v2
YugabyteDB uses a customized version of RocksDB, called DocDB, as its underlying distributed storage engine. DocDB is a log-structured merge-tree (LSM) based "key to object/document" store.
YugabyteDB is a high-performance transactional distributed SQL database for cloud-native and geo-distributed applications. YugabyteDB is consistent and partition tolerant. It supports distributed ACID transactions, auto-sharding, and auto-balancing. Besides PostgreSQL-compatible SQL API, it supports the Apache Cassandra Query Language (CQL).
YugabyteDB uses a customized version of RocksDB, called DocDB, as its underlying distributed storage engine. DocDB is a log-structured merge-tree (LSM) based "key to object/document" store.[05][06][07][08][09]
History[10][11]
YugabyteDB's first public beta release came out in November 2017. It was initially developed by the former team that built and ran Facebook's NoSQL platform that supported a number of Facebook's real-time applications. They left Facebook and founded Yugabyte Inc., aiming to build a distributed SQL database for mission-critical applications.
Compression[12][13][14]
Relying on RocksDB, YugabyteDB's storage engine is responsible for converting every supported data formats (i.e., documents, CQL rows) to key-value pairs and storing them in RocksDB. How data compression is accomplished in YugabyteDB depends on how it is done in RocksDB, which uses Dictionary Compression.
Concurrency Control[15][16]
YugabyteDB uses MVCC and a variant of OCC for concurrency control (as of March 2022, the pessimistic concurrency control was in active development). Under a distributed environment, it uses Two-Phase Commit with Early Acknowledgement. When a transaction wants to modify a number of rows, it first writes "provisional" records of each modified row into the target tablet storing the row. These records cannot be seen by the client unless the transaction commits. If conflicts occur when writing these records, the transaction will restart and abort. Otherwise, the transaction commits and notifies success to the client. After that, the "provisional" records are applied and cleaned asynchronously.
Data Model[06]
YugabyteDB's storage engine, DocDB, is based on RocksDB. Unlike RocksDB, DocDB is a "key to object/document" store instead of a "key to value" store. Values in DocDB can be primitive types as well as object types (e.g., lists, sorted sets, and sorted maps) with arbitrary nesting.
Indexes[17]
YugabyteDB supports log-structured merge-tree (LSM) and generalized inverted (GIN) indexes. These indexes are based on YugabyteDB's DocDB storage and are similar in functionality to PostgreSQL's btree and gin indexes, respectively.
Joins[19][20][21][22]
YugabyteDB SQL API supports the following types of joins: cross join, inner join, right outer join, left outer join, and full outer join.
YugabyteDB uses the following join algorithms: Nested Loop Join, Hash Join, Sort-Merge Join.
Logging[06]
YugabyteDB uses the Raft distributed consensus algorithm for replication, so all the changes to the database will be recorded in Raft logs, which can be used during recovery.
Query Interface[23]
YSQL is a PostgreSQL code-compatible API based around v11.2. YSQL is accessed via standard PostgreSQL drivers using native protocols. It exploits the native PostgreSQL code for the query layer and replaces the storage engine with calls to the pluggable query layer.
YCQL is a Cassandra-like API based around v3.10 and re-written in C++. YCQL is accessed via standard Cassandra drivers using the native protocol port of 9042. In addition to the 'vanilla' Cassandra components, YCQL is augmented with the following features: - Transactional consistency - unlike Cassandra, Yugabyte YCQL is transactional. - JSON data types supported natively - Tables can have secondary indexes
Storage Architecture[24]
YugabyteDB is a disk-oriented database management system. However, as its storage engine is implemented as a log-structured merge-tree (LSM), some of the data will be stored in memory before flushed out to disk.
Storage Model[06][25]
YugabyteDB's storage model depends on RocksDB, which uses Static Sorted Table (SST) format.
Storage Organization[06]
Same as RocksDB
YugabyteDB's storage engine relies on RocksDB, which is implemented as a log-structured merge-tree (LSM).
System Architecture[27]
YugabyteDB uses shared-nothing system architecture. A table will be split into multiple tablets. Depending on the replication factor, each tablet has its corresponding number of replicas (tablet peers) across different nodes.
Citations
32 sources- YugabyteDB: AI-Ready, Distributed, Postgres-Compatible Database yugabyte.com
- GitHub - yugabyte/yugabyte-db: YugabyteDB - the cloud native distributed SQL database for mission-critical applications. · GitHub github.com
- YugabyteDB | YugabyteDB Docs yugabyte.com
- YugabyteDB - Wikipedia wikipedia.org
- YugabyteDB FAQS | YugabyteDB Docs yugabyte.com
- https://docs.yugabyte.com/stable/architecture/concepts/persistence yugabyte.com
- Learn application development | YugabyteDB Docs yugabyte.com
- https://docs.yugabyte.com/stable/introduction/core-features yugabyte.com
- YugabyteDB: High-Performing Distributed SQL Database yugabyte.com
- About Yugabyte and YugabyteDB—the Distributed SQL Database yugabyte.com
- YugabyteDB Has Arrived yugabyte.com
- DocDB data model | YugabyteDB Docs yugabyte.com
- Compression · facebook/rocksdb Wiki · GitHub github.com
- https://docs.yugabyte.com/stable/architecture/concepts/persistence#encoding-details yugabyte.com
- Fundamentals of Distributed Transactions | YugabyteDB Docs yugabyte.com
- https://docs.yugabyte.com/stable/architecture/transactions/explicit-locking#pessimistic-concurrency-control yugabyte.com
- Indexes | YugabyteDB Docs yugabyte.com
- Isolation levels | YugabyteDB Docs yugabyte.com
- Explore YSQL, the Yugabyte SQL API | YugabyteDB Docs yugabyte.com
- YSQL Architecture: Implementing Distributed SQL in YugabyteDB | Yugabyte yugabyte.com
- Reading data | YugabyteDB Docs yugabyte.com
- PostgreSQL: Documentation: 10: 50.5. Planner/Optimizer postgresql.org
- YugabyteDB API reference (for YSQL and YCQL) | YugabyteDB Docs yugabyte.com
- Key concepts | YugabyteDB Docs yugabyte.com
- A Tutorial of RocksDB SST formats · facebook/rocksdb Wiki · GitHub github.com
- Stored procedures | YugabyteDB Docs yugabyte.com
- Key concepts | YugabyteDB Docs yugabyte.com
- Explore YSQL, the Yugabyte SQL API | YugabyteDB Docs yugabyte.com
- https://www.crunchbase.com/organization/yugabyte crunchbase.com
- https://github.com/yugabyte/yugabyte-db/commit/a4ec574c19aa6e9c8648e8ced1f4ca4fc5fec5ed github.com
- https://github.com/yugabyte/yugabyte-db/commit/57706dd4e02de37ed0f2a18edd9ce2c00bb0b8a3 github.com
- https://github.com/yugabyte/yugabyte-db/commit/48dbf4564442d141c29331f635b5cf561c17998e github.com