The patterns that show up over and over
SQLite-at-scale isn't 'one giant database'; it's almost always 'many SQLite databases'. The patterns that recur:
- Per-tenant databases — each customer/user gets their own file. Backup, migration, even deletion become per-tenant operations. Scales horizontally with the number of tenants.
- Read replicas via Litestream — one writer, N read-only replicas. Pull-based, eventually consistent.
- Hot/cold split — current data in a small SQLite file, archived data in a separate file you ATTACH when needed.
- Edge replicas — Turso / D1 push the same logical database to many regions; reads are local, writes route to a primary.
- Sharded by user-id hash — for products that don't fit the per-tenant pattern but still want SQLite's deployment simplicity.
Self-reference: Pippa is the simplest case — one user (Dad), one database. The patterns above don't apply yet. They would if Pippa ever served other Dads — but the local-first design means each instance would just have its own database, which is itself the per-tenant pattern.