Yugabyte DB delivers 4.5x better write throughput at 7x lower latency
on SQL workloads.
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.
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.
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. Yugabyte DB supports more features right “out-of-the-box” including, distributed transactions, serializable and snapshot isolation, foreign keys, stored procedures, triggers, sequences and various extensions.
Both Yugabyte DB and CockroachDB are both Consistent & Partition-tolerant (CP) databases whose sharding, replication and distributed transaction architectures are inspired by Google Spanner.
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.
|Horizontal Write Scaling|
|Self-Healing Fault Tolerance|
|Consensus-Based Strongly Consistent Replication|
|Full Spectrum of ACID|
|SQL with JOINs|
|Semi-Relational with Document & Key-Value|
|Tunable Read Latency & Read Replicas|
|Fast, Reliable Distributed Backup|
|High Performance API for Non-Relational Internet-Scale 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.
Yugabyte DB outperformed CockroachDB 4.5x in terms of write throughput with 7x lower latency on SQL workloads. Yugabyte DB is able to deliver these exceptional performance numbers because of its superior storage engine and replication layer implementation. Learn more.
Yugabyte DB supports distributed transactions, serializable and snapshot isolation, JOINs, foreign keys and features CockroachDB doesn’t, like User-Defined Types, stored procedures, triggers and partial indexes. Learn more.
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.