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 MetadataData about a file, such as its name, size and timestamps, as distinct from its contents.Full definition →, 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 RecordOne unit of data in a file or table, such as one supplier's quote; distinct from a line of text.Full definition → can still trigger a Postgres fallback. This design reduces the central system's role in the busiest request PathA description of a file or folder location, written using directory names and separators.Full definition →, 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.