← Back to posts

Cloudflare D1: SQLite at the Edge

Cloudflare D1: SQLite at the Edge

What Is D1?

D1 is Cloudflare's serverless SQL database built on SQLite. It runs inside Cloudflare's network, close to your users, and integrates natively with Workers and Pages. If you know SQL, you already know D1.

Why SQLite on the Edge?

SQLite is the most deployed database engine in the world — it powers your phone, your browser, and now your edge functions. Its simplicity means fewer moving parts, faster cold starts, and predictable performance.

Practical Limitations

D1 is not a replacement for Postgres or MySQL in every scenario. Write-heavy workloads, complex transactions, and very large datasets still benefit from traditional databases. But for read-heavy content sites, D1 is remarkably capable.

Getting Started

Create a database with one CLI command, define your schema in plain SQL, and query it directly from your Worker. No connection strings, no connection pooling, no ORM required — just SQL and JavaScript.