YugaByte DB delivers an average of 3.5x better throughput and 3x lower latency
across all workloads with support for both scale-out RDBMS and internet-scale OLTP apps.
Both YugaByte DB and CockroachDB are open source Consistent & Partition-tolerant (CP) databases whose sharding, replication and distributed transaction architectures are inspired by Google Spanner.
YugaByte DB is the world’s first cloud native database to support both scale-out RDBMS and internet-scale OLTP in a single system. Developers can choose between a fully relational model and a semi-relational flexible-schema model. CockroachDB only offers a “one size fits all” relational model.
DocDB, YugaByte DB’s storage engine, transforms RocksDB from a key-value store (with only primitive data types) to a document store (with complex data types). It is fully optimized for workloads needing fast reads, high volume ingest and high data density. CockroachDB uses RocksDB as a “black-box library” without any optimizations.
YugaByte DB reuses the native PostgreSQL database server and simply swaps in a strongly consistent, distributed storage layer. CockroachDB has reimplemented the PostgreSQL API in Go.
Both YugaByte DB and CockroachDB make use of the Raft consensus protocol to manage data replication and leader election. However, YugaByte DB’s Raft log acts as a unified transaction log for both the replication and storage engine functions. This design avoids the dual-write performance penalty developers observe in CockroachDB.
YugaByte DB is written in C/C++ from top to bottom. CockroachDB uses a mixture of Go for query parsing and the database server, and C++ for storage. Developers know from experience that multi-language software designs can lead to unpredictable behaviors especially when stressed under internet-scale conditions.
|Horizontal Write Scaling|
|Self-Healing Fault Tolerance|
|Consensus-Based Strongly Consistent Replication|
|Full Spectrum of ACID|
|SQL with JOINs|
|Semi-Relational with Document & KV|
|Tunable Read Latency & Read Replicas|
|Fast, Reliable Distributed Backup|
|High Performance for Internet-Scale Transactional Workloads|
YugaByte DB supports the ability to configure follower reads to allow high performance apps to read timeline-consistent data from shard followers. This increasing throughput while lowering latency. CockroachDB supports only strongly consistent reads from shard leaders.
Raft observer nodes act as read replicas in remote regions thus ensuring low latency reads without adding inter-region latency to the write path. CockroachDB does not support read replicas, thus adding inter-region latency to the write path even when a remote region is read intensive.
YugaByte DB distributed backups are designed to copy data from only the shard leaders using checkpoints without involving any of replicas at any time. CockroachDB requires a logical scan of the table in order to identify a consistent snapshot because it relies on the underlying RocksDB primitives as-is.
Averaged across a wide array of access patterns important to internet-scale transactional workloads, YugaByte DB outperformed CockroachDB 3.5x in terms of throughput and 3x in terms of latency. YugaByte DB is able to deliver these exceptional performance numbers because of its superior storage engine and replication layer implementation.
CockroachDB’s higher latency read/write operations mandate the use of a separate caching tier to power low latency customer-facing apps. YugaByte DB’s obviates the need for such a cache and helps increase customer loyalty by serving blazing fast user experiences through native queries.
Run ever-growing data workloads alongside distributed transactional workloads on the same cluster with each node handling multiple terabytes of data density. Achieve lowest Total Cost of Ownership through lower infrastructure costs combined with the lower labor cost of managing clusters efficiently with complete automation.
With its unique ability to power both scale-out RDBMS and internet-scale OLTP workloads, YugaByte DB delivers a more future-proofed operational data tier than compared to the relational-only CockroachDB. Build and run complex microservices faster than ever before.