vs

CockroachDB vs FoundationDB

CockroachDB: Postgres-wire distributed SQL built to survive node, zone and region failures with serializable transactions. FoundationDB: Apple's ordered, strictly serializable distributed key-value store, built to have layers on top.

key differences

  • CockroachDB is primarily a relational database; FoundationDB is key-value.
  • Licensing: CockroachDB is source-available (CockroachDB Software License); FoundationDB is open source (permissive) (Apache License 2.0).
  • Only CockroachDB has joins, secondary indexes, full-text search, vector search, geospatial.
  • Only FoundationDB has pub/sub.
  • CockroachDB has a serverless option; FoundationDB does not.

choose cockroachdb for

  • +Global payments and ledger systems of record
  • +Identity, account and session metadata across regions
  • +Inventory and order management with strict consistency
  • +Data-residency workloads that must pin rows to a country

best at · OLTP, Geo, Metadata

choose foundationdb for

  • +Metadata stores for larger systems (catalogs, object stores)
  • +Foundation for custom databases and layers
  • +Multi-tenant app backends via the Record Layer
  • +Transactional queues and job systems

best at · OLTP, Metadata, Queue

overview
Primary model
Relational
Key-Value
Also supports
Document, Spatial, Vector
–
Type
Database engine
Database engine
Status
Active
Active
Developer
Cockroach Labs
Apple
First release
2015
2013
Latest version
26.3 (Aug 19, 2026)
7.3.77 (Apr 16, 2026)
License
Source-availableCockroachDB Software License
Open source (permissive)Apache License 2.0
Free tier
✓
✓
popularity
WhichDB Score
47.1
36.8
Rank
#33
#54
GitHub stars
32.6K
16.8K
Stack Overflow questions
467
37
scale & guarantees
Comfortable data size
Large (≤ 1 PB)
Large (≤ 1 PB)
Horizontal scaling
Native
Native
Multi-region
Active active
Read replicas
ACID
Full
Full
Consistency
Strong
Strong
Schema
Strict
Schemaless
Architecture
Distributed, Multi primary, Client server, Serverless
Distributed, Client server
deployment
Self-hosted
✓
✓
Vendor-managed cloud
✓
—
Serverless
✓
—
Embedded
—
—
Edge
—
—
Clouds
AWS, Google Cloud, Azure
–
capabilities
Transactions
✓
✓
Joins
✓
—
Secondary indexes
✓
—
Full-text search
✓
—
Vector search
✓
—
Geospatial
✓
—
JSON
✓
—
Change data capture
✓
—
Triggers
✓
—
Stored procedures
✓
—
Materialized views
✓
—
TTL / expiry
✓
—
Pub/Sub
—
✓
Columnar storage
—
—
In-memory
—
—
Durable persistence
✓
✓
Compression
✓
—
Encryption at rest
✓
✓
Role-based access
✓
—
Time travel
✓
—
Branching
—
—
Online schema changes
✓
—
Streaming ingest
—
—
Offline sync
—
—
Runs in WebAssembly
—
—
interfaces
Query languages
SQL, PL/pgSQL
FoundationDB API
Client languages
Java, Go, Python, JavaScript, C#, Ruby, Rust, PHP
C, Python, Java, Go, Ruby, Rust, JavaScript, Swift
Best for
OLTP, Geo, Metadata, Ledger
OLTP, Metadata, Queue

CockroachDB vs FoundationDB: FAQ

What is the difference between CockroachDB and FoundationDB?

CockroachDB: Postgres-wire distributed SQL built to survive node, zone and region failures with serializable transactions. FoundationDB: Apple's ordered, strictly serializable distributed key-value store, built to have layers on top. CockroachDB is primarily a relational database; FoundationDB is key-value. Licensing: CockroachDB is source-available (CockroachDB Software License); FoundationDB is open source (permissive) (Apache License 2.0). Only CockroachDB has joins, secondary indexes, full-text search, vector search, geospatial.

When should I choose CockroachDB over FoundationDB?

Choose CockroachDB for global payments and ledger systems of record; identity, account and session metadata across regions; and inventory and order management with strict consistency. Choose FoundationDB for metadata stores for larger systems (catalogs, object stores); foundation for custom databases and layers; and multi-tenant app backends via the Record Layer.

Is CockroachDB or FoundationDB more popular?

CockroachDB ranks #33 on the WhichDB Score (47.1/100) and FoundationDB ranks #54 (36.8/100). Popularity is not fit: check the requirements that matter for your project.

Are CockroachDB and FoundationDB open source?

Not in the OSI sense. CockroachDB is source-available: you can read the code, but the license restricts some uses, typically offering it as a competing managed service. License: CockroachDB Software License. Yes. FoundationDB is open source. License: Apache License 2.0.