Storage
CreatedApr 4, 2026Takeshi Takatsudo
KV, D1, and R2 storage services
Cloudflare offers three storage services, each optimized for different access patterns.
Overview
| Service | Type | Best For | Consistency |
|---|---|---|---|
| KV | Key-value store | Read-heavy, eventually consistent data | Eventual |
| D1 | SQL database (SQLite) | Relational data, complex queries | Strong |
| R2 | Object storage (S3-compatible) | Files, images, large blobs | Strong |
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