Get Started
D1 Plus is the resource layer that turns a logical database into one or more physical D1 databases while keeping the Database Product contract stable.
What D1 Plus Owns
Section titled “What D1 Plus Owns”D1 Plus owns:
- shard sets
- routing manifests
- shard-to-D1 bindings
- expansion resources
- rebalance progress
- deployment-time conversion state
Database code continues to use the same logical database identity while D1 Plus decides which physical D1 shard serves each request.
Runtime Shapes
Section titled “Runtime Shapes”The runtime uses these shapes behind the Database Product boundary:
- one-shard path for fixed databases
- multi-shard routing path for sharded databases
- expansion path while moving from one layout to another
- local rebalance path during dev and deploy validation
Expansion Flow
Section titled “Expansion Flow”When a logical database grows, Layeron compares the applied store with the new desired layout and stages target routing resources before activation.
applied store -> desired larger shard layout -> prepared target routing manifest -> expansion resource -> source-primary runtime -> fan-out reads and shadow writes -> rebalance -> target activation -> source cleanupNext Steps
Section titled “Next Steps”- Expansion and rebalance: Learn how shard layout conversion is prepared and coordinated.
- Database capacity and sharding: Choose fixed, manual, or auto capacity for
db(...). - Database query data: Route queries with shard hints and use typed result helpers.
- Database migrations: Apply schema changes across D1 Plus shard sets.