Vibeleaderboard
← All Intel
Intel / blog

Under the hood, off the hot path: how D1 scales to millions of databases

Source
blog.cloudflare.com
Date

Context

Cloudflare's D1 database service separates the work of managing databases from the work of answering queries. Its engineering account explains that central Postgres stores database , while each D1 database runs in a separate SQLite-backed Durable Object.

Routine HTTP queries find their destination through Workers KV, a distributed store holding routing information, and then reach the relevant database. Because KV retains that information beyond its cache, an ordinary cache miss need not reach central Postgres. A missing KV can still trigger a Postgres fallback. This design reduces the central system's role in the busiest request , avoiding a shared metadata lookup for every query.

Terms in this piece · Glossary
  • Metadata — Data about a file, such as its name, size and timestamps, as distinct from its contents.
  • Record — One unit of data in a file or table, such as one supplier's quote; distinct from a line of text.
  • Path — A description of a file or folder location, written using directory names and separators.
  • Agent — A system in which a model repeatedly chooses operations, a harness carries them out, and the results return to the model to inform its next choice.

Get the Brief

A cited digest of what matters for people building with AI, every morning. Unsubscribe anytime. See today’s edition

Read the source blog.cloudflare.com
Recommended reads