DBDB.io The Encyclopedia of Database Systems · Est. 2017
Database of Databases

Database Entry

YugabyteDB


YugaByte DB is a transactional database management system that can scale up and down across multiple regions for planet-scale and geo-distributed applications. Offering both SQL and NoSQL in one platform, it supports distributed ACID transactions, auto-sharding, and auto-balancing. It provides compatible APIs extended from Redis commands and Apache Cassandra Query Language (CQL), and SQL API which is compatible with PostgreSQL. Built on a customized version of RocksDB, YugaByte DB's storage engine, DocDB, is a log-structured merge-tree (LSM) based "key to object/document" store.[04][05][06]

Source Code
https://github.com/yugabyte/yugabyte-db[02]
Developer
Country of Origin
US
Start Year
2016 [21]
Project Types
Commercial, Open Source
Written in
C++
Supported Languages
C, C#, C++, Go, Java, JavaScript, Python
Derived From
RocksDB
Inspired By
Cloud Spanner
Compatible With
Cassandra, PostgreSQL, Redis
Operating Systems
Linux, macOS
License
Apache v2

Database Entry

YugabyteDB


YugaByte DB is a transactional database management system that can scale up and down across multiple regions for planet-scale and geo-distributed applications. Offering both SQL and NoSQL in one platform, it supports distributed ACID transactions, auto-sharding, and auto-balancing. It provides compatible APIs extended from Redis commands and Apache Cassandra Query Language (CQL), and SQL API which is compatible with PostgreSQL. Built on a customized version of RocksDB, YugaByte DB's storage engine, DocDB, is a log-structured merge-tree (LSM) based "key to object/document" store.[04][05][06]

History[07]


YugaByte DB's first public beta release came out in November 2017. It was developed by the former team that built and ran Facebook's NoSQL platform that supported a number of real-time applications. They left Facebook and found their own company, YugaByte Inc, aiming to build a database management system to unify the data layer for mission-critical applications. Companies like Amazon, Netflix, and Uber have lots of experts, so they manage to offer complex DBaaS platforms which benefit their app developers. However, for traditional enterprises and small startups, the data layer is still an unsolved problem. This is where YugaByte DB comes to rescue.

Compression[08][09]


Since YugaByte DB's storage engine (DocDB) relies on RocksDB, it is responsible for converting every supported data formats (i.e., documents, CQL rows, and Redis data) to key-value pairs and store them in RocksDB. How data compression is performed in YugaByte DB depends on how it is done in RocksDB, which uses Dictionary Compression.

Concurrency Control[10]


YugaByte DB uses MVCC for concurrency control. Although not clearly stated, it uses a variant of OCC to ensure atomicity. 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 to the target tablet storing the row. These records will not be seen by the client unless the transaction commits. If conflicts occur when writing these records, the transaction will restart and abort. In this case, the client will see a certain number of retries (restarts are transparent to clients). If no conflicts occur, the transaction will commit and notify success to client. After that, the "provisional" records are applied and cleaned asynchronously.

Data Model[05]


YugaByte DB'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.

Foreign Keys[11][12]


YugaByte DB does not support foreign keys as none of its CREATE TABLE commands offer keywords to set foreign key constraints.

Isolation Levels[13]


YugaByte DB currently only supports Snapshot Isolation and is still working on supporting Serializable Isolation.

Joins[14][15][16]


Only YugaByte DB's PostgreSQL-compatible API YSQL (beta) supports join operations (i.e., inner, outer, left, and right join). The other two APIs, YEDIS and YCQL, do not support this operation. The documentation does not clear states what join algorithms are used internally.

Logging


Query Interface[17]


YugaByte DB offers the following three query APIs:

  • YCQL: Cassandra-compatible API that supports DDL/DML statements, builtin functions, expression operators, and user-defined data types.
  • YEDIS: Redis-compatible API that supports data types including string, hash, set, sorted set, list, and time seris (new in YugaByte DB).
  • YSQL (beta): PostgreSQL-compatible API that supports DDL/DML statements, builtin functions, expression operators, and user-defined data types.

Storage Architecture[18]


YugaByte DB is a disk-based database management system. However, as its storage engine is implemented as a log-structed merge-tree (LSM), some of the data will be in memory before flushed out to disk.

Storage Model[19]


YugaByte DB's storage model depends on RocksDB, which is customed (SST format).

Storage Organization[05]


YugaByte DB's storage engine relies on RocksDB, which is implemented as a log-structured merge-tree (LSM).

System Architecture[20]


YugaByte DB 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

21 sources
  1. YugabyteDB: AI-Ready, Distributed, Postgres-Compatible Database yugabyte.com
  2. GitHub - yugabyte/yugabyte-db: YugabyteDB - the cloud native distributed SQL database for mission-critical applications. · GitHub github.com
  3. YugabyteDB | YugabyteDB Docs yugabyte.com
  4. YugabyteDB FAQS | YugabyteDB Docs yugabyte.com Dead — Check Archive
  5. https://docs.yugabyte.com/latest/architecture/concepts/persistence/ yugabyte.com Dead — Check Archive
  6. Learn application development | YugabyteDB Docs yugabyte.com
  7. YugabyteDB Has Arrived yugabyte.com
  8. https://docs.yugabyte.com/latest/architecture/concepts/persistence/#encoding-details yugabyte.com Dead — Check Archive
  9. Compression · facebook/rocksdb Wiki · GitHub github.com
  10. Transactional I/O path | YugabyteDB Docs yugabyte.com
  11. https://docs.yugabyte.com/latest/api/cassandra/ddl_create_table/ yugabyte.com Dead — Check Archive
  12. https://docs.yugabyte.com/latest/api/postgresql/ddl_create_table/ yugabyte.com Dead — Check Archive
  13. Transaction isolation levels | YugabyteDB Docs yugabyte.com
  14. Explore YSQL, the Yugabyte SQL API | YugabyteDB Docs yugabyte.com
  15. SELECT statement [YCQL] | YugabyteDB Docs yugabyte.com
  16. https://docs.yugabyte.com/latest/api/postgresql/dml_select/ yugabyte.com Dead — Check Archive
  17. YugabyteDB API reference (for YSQL and YCQL) | YugabyteDB Docs yugabyte.com
  18. Key concepts | YugabyteDB Docs yugabyte.com
  19. A Tutorial of RocksDB SST formats · facebook/rocksdb Wiki · GitHub github.com
  20. Key concepts | YugabyteDB Docs yugabyte.com
  21. https://www.crunchbase.com/organization/yugabyte#section-overview crunchbase.com
Revision #12