Latest Results
feat(replica): shard embedded replica per app with Durable Objects, drop D1
D1 has a per-database throughput ceiling we already hit with DB_STOREAPPS,
so replace the single shared D1 with one SQLite-backed Durable Object per
${region}:${app_id} — reads scale horizontally with the number of active
apps and each app only competes with itself.
- migration: outbox now carries routing keys (app_id / owner_org, resolved
in-trigger for manifest and stripe_info) and covers the 7 hot-path tables
- ReplicaRouter DO: drains the outbox into a SQLite journal (exactly-once),
fans out to registered replicas by app/org with per-target cursors,
retries then invalidates flaky replicas, refreshes freshness leases,
prunes the journal
- AppReplica DO: lazy self-seed from the read replica on first read in a
region (keyset-paginated, buffers pushes mid-seed), idempotent apply,
lease-gated reads, idle self-eviction after 7 days
- reader: two region-local RPCs per update check, same shapes as the
Postgres path, automatic per-request fallback when a replica is warming
up, stale, or erroring; rollout decisions stay worker-side (Cache API)
- validated: query builders + reader mapping run against real SQLite
(bun:sqlite), migration dry-run applied on local Supabase, both workers
bundle via wrangler --dry-run
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Latest Branches
+38%
codex/read-replica-release-guard 0%
+38%
© 2026 CodSpeed Technology