Spanner Logo

A comparison of the two Distributed SQL leaders

CockroachDB vs. Google Cloud Spanner

/* If you like Spanner, you’ll love CockroachDB. Learn more about the difference between them. */

Why choose CockroachDB over Spanner?

Multiple Cloud Icon

Multiple clouds

CockroachDB can run anywhere, on any cloud, and even across multiple clouds and the hybrid cloud

Global transaction icon

Global transactions

CockroachDB has features like parallel commits and pipelining to optimize globally distributed transactions

Multi region Simplicity icon

Multi-region simplicity

CockroachDB provides simple DDL that allows you to define where data will live across multiple regions

CockroachDB and Spanner employ a similar distributed architecture; however, with CockroachDB you are free to deploy wherever and however you like.

image
image
imageAvailability
GCP Only
All public clouds, on-prem and local
imageArchitecture
Architected to span globally distributed data centers, yet still valuable in a single data center
Architected to resiliently span globally distributed data centers, while still being valuable in a single data center
imageDistributed transactions
Limited ability to optimize latency concerns for multi-region writes
Intelligent replication uses RAFT to place data and efficiently utilize available storage and compute resources
imageMulti-region writes
Limited ability to optimize latency concerns for multi-region writes
Advances in parallel commits and transaction pipelining reduce broad geographic transaction latencies
imageData residency
Entire database lives in each region with no control at row level for survival/latency/compliance goals for data
Data is tied to a node at the row level to optimize performance and/or comply with data regulations
imageHybrid and multi-cloud deployment
Tied to GCP instances only, no options for multi and/or hybrid cloud
Run anywhere on any cloud and even across regions and clouds
imagePricing
A la carte pricing for networking, storage and per-instance with limited availability
Simple, straightforward pricing, plus the ability to tie data to a location to avoid egress costs

Databases and platform freedom

CockroachDB is architected to give you the freedom to deploy your database anywhere and on any cloud. You can use the best solution and still gain value from any cloud provider

Freedom from Lock-In

Make smart use of your existing resources with CockroachDB’s hybrid-cloud capabilities. AWS Aurora won’t let you deploy in a hybrid environment

Freedom of Choice

Pick any (or multiple) providers and run self-deployed or as-a-service. Because no one should have to be locked into a single provider

Freedom to Grow

Effortlessly scale and take control of your workloads. Avoid the significant egress costs often seen when moving data with AWS Aurora

Switch to CockroachDB Today

/* Go hands-on with 100% free CockroachDB Serverless. Spin up your first cluster in just a few clicks. */