zudo-cloudflare-wisdom

Type to search...

to open search from anywhere

Storage

CreatedApr 4, 2026Takeshi Takatsudo

KV, D1, and R2 storage services

Cloudflare offers three storage services, each optimized for different access patterns.

Overview

ServiceTypeBest ForConsistency
KVKey-value storeRead-heavy, eventually consistent dataEventual
D1SQL database (SQLite)Relational data, complex queriesStrong
R2Object storage (S3-compatible)Files, images, large blobsStrong

Choosing the Right Service

graph TD A[What kind of data?] --> B{Structured/relational?} B -->|Yes| C[D1 - SQL database] B -->|No| D{Large files/blobs?} D -->|Yes| E[R2 - Object storage] D -->|No| F{Read-heavy, ok with eventual consistency?} F -->|Yes| G[KV - Key-value store] F -->|No| C

In This Section

  • KV — Key-value namespace usage patterns
  • D1 — SQL database with SQLite
  • R2 — Object storage for files