vs

Cloudflare D1 vs Cloudflare Durable Objects

Cloudflare D1: Serverless SQLite for Cloudflare Workers, priced per row read and written, with read replicas and time travel. Cloudflare Durable Objects: Single-threaded stateful actors at the edge, each with its own strongly consistent SQLite store.

key differences

  • Cloudflare D1 is primarily a relational database; Cloudflare Durable Objects is key-value.
  • Cloudflare Durable Objects is built for larger datasets (≤ 1 PB) than Cloudflare D1 (≤ 100 GB).
  • Horizontal scaling is manual in Cloudflare D1 and native in Cloudflare Durable Objects.
  • Only Cloudflare D1 has full-text search, triggers.
  • Only Cloudflare Durable Objects has pub/sub.

choose cloudflare-d1 for

  • +Database-per-tenant SaaS on Workers
  • +Edge apps, blogs and CMS backends
  • +Configuration and feature metadata near users
  • +Prototypes needing SQL without managing servers

best at · OLTP, Edge, Content

choose cloudflare-durable-objects for

  • +Chat rooms and collaborative editing backends
  • +Multiplayer game and session state
  • +Rate limiters and distributed counters
  • +Per-user or per-tenant databases

best at · Edge, OLTP, Sessions

overview
Primary model
Relational
Key-Value
Also supports
Document
Relational
Type
Managed service
Managed service
Status
Active
Active
Developer
Cloudflare
Cloudflare
First release
2022
2020
Latest version
–
–
License
ProprietaryProprietary (Cloudflare service)
ProprietaryProprietary (Cloudflare service)
Free tier
✓
✓
popularity
WhichDB Score
5.8
7.2
Rank
#373
#346
GitHub stars
–
–
Stack Overflow questions
–
–
scale & guarantees
Comfortable data size
Small (≤ 100 GB)
Large (≤ 1 PB)
Horizontal scaling
Manual
Native
Multi-region
Read replicas
None
ACID
Full
Full
Consistency
Strong, Causal
Strong
Schema
Strict
Flexible
Architecture
Serverless, Primary replica
Distributed, Serverless, Embedded
deployment
Self-hosted
—
—
Vendor-managed cloud
✓
✓
Serverless
✓
✓
Embedded
—
—
Edge
✓
✓
Clouds
Cloudflare
Cloudflare
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
SQL (SQLite), Storage key-value API
Client languages
JavaScript, TypeScript, Python, Rust
JavaScript, TypeScript, Python, Rust
Best for
OLTP, Edge, Content, Coordination
Edge, OLTP, Sessions, Pub/Sub

Cloudflare D1 vs Cloudflare Durable Objects: FAQ

What is the difference between Cloudflare D1 and Cloudflare Durable Objects?

Cloudflare D1: Serverless SQLite for Cloudflare Workers, priced per row read and written, with read replicas and time travel. Cloudflare Durable Objects: Single-threaded stateful actors at the edge, each with its own strongly consistent SQLite store. Cloudflare D1 is primarily a relational database; Cloudflare Durable Objects is key-value. Cloudflare Durable Objects is built for larger datasets (≤ 1 PB) than Cloudflare D1 (≤ 100 GB). Horizontal scaling is manual in Cloudflare D1 and native in Cloudflare Durable Objects.

When should I choose Cloudflare D1 over Cloudflare Durable Objects?

Choose Cloudflare D1 for database-per-tenant SaaS on Workers; edge apps, blogs and CMS backends; and configuration and feature metadata near users. Choose Cloudflare Durable Objects for chat rooms and collaborative editing backends; multiplayer game and session state; and rate limiters and distributed counters.

Is Cloudflare D1 or Cloudflare Durable Objects more popular?

Cloudflare Durable Objects ranks #346 on the WhichDB Score (7.2/100) and Cloudflare D1 ranks #373 (5.8/100). Popularity is not fit: check the requirements that matter for your project.

Are Cloudflare D1 and Cloudflare Durable Objects open source?

No. Cloudflare D1 is proprietary, closed-source software. No. Cloudflare Durable Objects is proprietary, closed-source software.