René's URL Explorer Experiment


Title: D1 read replication is documented but never enabled or used · Issue #337 · voidzero-dev/void · GitHub

Open Graph Title: D1 read replication is documented but never enabled or used · Issue #337 · voidzero-dev/void

X Title: D1 read replication is documented but never enabled or used · Issue #337 · voidzero-dev/void

Description: Summary The docs promise "Database reads are fast everywhere via D1's read replication" (docs/guide/index), but nothing in void enables or uses it: databases are provisioned without read_replication, and void/db never calls withSession()...

Open Graph Description: Summary The docs promise "Database reads are fast everywhere via D1's read replication" (docs/guide/index), but nothing in void enables or uses it: databases are provisioned without read_replicatio...

X Description: Summary The docs promise "Database reads are fast everywhere via D1's read replication" (docs/guide/index), but nothing in void enables or uses it: databases are provisioned without r...

Opengraph URL: https://github.com/voidzero-dev/void/issues/337

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"D1 read replication is documented but never enabled or used","articleBody":"## Summary\n\nThe docs promise \"Database reads are fast everywhere via D1's read replication\" (`docs/guide/index`), but nothing in void enables or uses it: databases are provisioned without `read_replication`, and `void/db` never calls `withSession()`, so every query — including per-request auth lookups — always hits the D1 primary.\n\nDiscovered while investigating production 503s on a void-deployed app: the dispatch worker races `worker.fetch()` against a 10s deadline, and sequential D1 round trips to an APAC-primary database push the p99 tail past it.\n\n## Evidence\n\n- `platform/packages/api/src/provisioning/cloudflare-api.ts` — `createD1Database` posts only `{name}`; no `read_replication` config.\n- `packages/void/src/cli/provision.ts:4465` — `wrangler d1 create \u003cname> --binding ... --update-config` with no `--read-replication` flag; nothing writes `read_replication` into `d1_databases[]` config.\n- `packages/void/src/runtime/db.ts:60` — `db` proxy wraps `drizzle(requireRuntimeBinding('DB'))` on the raw binding. `D1Database.withSession()` / `D1DatabaseSession.getBookmark()` are never exposed.\n- `packages/void/src/runtime/better-auth.ts:9` — `resolveDatabase` passes `env.DB` directly to better-auth, so auth's per-request session+user lookups can't use a replica session either.\n- Repo-wide, `read_replication`/`withSession` appear only in the docs claim; no code or tests reference them.\n\n## Impact\n\nEvery D1 query in every void app pays a round trip to the database's primary region. For APAC-primary databases serving global traffic that's ~800ms+ per hop; auth middleware alone does 2+ sequential hops per request.\n\n## Suggested approach\n\n1. **Enable at provisioning**: `read_replication: { mode: \"auto\" }` on `createD1Database` (platform API path) and `wrangler d1 create --read-replication enabled` / wrangler config emission (CLI path).\n2. **Session API in `void/db`**: expose a per-request D1 session, e.g. `db.withSession(\"first-unconstrained\")` or a request-scoped drizzle instance via `getRuntimeRequestResource` (`env.ts` already has the plumbing). Drizzle's d1 driver only calls `prepare`/`batch`, which `D1DatabaseSession` supports — needs a type widening since `drizzle()` is typed against `D1Database`.\n3. **Auth path**: route `resolveVoidAuthState` / `runVoidAuthMiddleware` session lookups through a D1 session — biggest win, since every request's auth hops would hit the nearest replica with sequential consistency.\n","author":{"url":"https://github.com/Brooooooklyn","@type":"Person","name":"Brooooooklyn"},"datePublished":"2026-09-22T15:44:55Z","url":"https://github.com/voidzero-dev/void/issues/337"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:27377e9e-091b-ac5c-436d-e342541b9d17
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8074:1B6493:1D4237B:27BB414:6AFB9E78
html-safe-nonce1a3aa3ddf6ab56e077ef49ac0baeb1d307edc956bde5ef3e7020fa2bdbd6d817
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDc0OjFCNjQ5MzoxRDQyMzdCOjI3QkI0MTQ6NkFGQjlFNzgiLCJ2aXNpdG9yX2lkIjoiMzkyMzc3NDc3NTAwNzg3ODc3NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf1a4fd5419a24723d6152c905871c219e93ac62762f17103804f289b0435a2a1
hovercard-subject-tagissue:5541873667
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/voidzero-dev/void/337/issue_layout
twitter:imagehttps://opengraph.githubassets.com/7a0dc19e0b9683c5af055ce389846678f7790222f9a3413aecc90dfa20cbd303/voidzero-dev/void/issues/337
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7a0dc19e0b9683c5af055ce389846678f7790222f9a3413aecc90dfa20cbd303/voidzero-dev/void/issues/337
og:image:altSummary The docs promise "Database reads are fast everywhere via D1's read replication" (docs/guide/index), but nothing in void enables or uses it: databases are provisioned without read_replicatio...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameBrooooooklyn
hostnamegithub.com
expected-hostnamegithub.com
None3cefd19a936819d82cfb5279d50fb56fe79cb9ec30f0f807e04e89b0c58ffae1
turbo-cache-controlno-preview
go-importgithub.com/voidzero-dev/void git https://github.com/voidzero-dev/void.git
octolytics-dimension-user_id149750581
octolytics-dimension-user_loginvoidzero-dev
octolytics-dimension-repository_id1164437080
octolytics-dimension-repository_nwovoidzero-dev/void
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1164437080
octolytics-dimension-repository_network_root_nwovoidzero-dev/void
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release606800bdb1b81d125fc845bdcc262c9fe063fc8f
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/voidzero-dev/void/issues/337#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fvoidzero-dev%2Fvoid%2Fissues%2F337
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fvoidzero-dev%2Fvoid%2Fissues%2F337
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=voidzero-dev%2Fvoid
Reloadhttps://github.com/voidzero-dev/void/issues/337
Reloadhttps://github.com/voidzero-dev/void/issues/337
Reloadhttps://github.com/voidzero-dev/void/issues/337
voidzero-devhttps://github.com/voidzero-dev
voidhttps://github.com/voidzero-dev/void
Codehttps://github.com/voidzero-dev/void
Issues30 (30)https://github.com/voidzero-dev/void/issues
Pull requests13 (13)https://github.com/voidzero-dev/void/pulls
Discussionshttps://github.com/voidzero-dev/void/discussions
Actionshttps://github.com/voidzero-dev/void/actions
Security and qualityhttps://github.com/voidzero-dev/void/security
Insightshttps://github.com/voidzero-dev/void/pulse
https://github.com/voidzero-dev/void
New issuehttps://github.com/login?return_to=https://github.com/voidzero-dev/void/issues/337
New issuehttps://github.com/login?return_to=https://github.com/voidzero-dev/void/issues/337
D1 read replication is documented but never enabled or usedhttps://github.com/voidzero-dev/void/issues/337#top
https://github.com/Brooooooklyn
Brooooooklynhttps://github.com/Brooooooklyn
on Sep 22, 2026https://github.com/voidzero-dev/void/issues/337#issue-5541873667
cpojerhttps://github.com/cpojer
completedhttps://github.com/voidzero-dev/void/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
acc2ebbhttps://github.com/voidzero-dev/void/commit/acc2ebbb133870932bd526d253a063b18e2e4134
on Sep 29, 2026https://github.com/voidzero-dev/void/issues/337#event-32090587906
Sign up for freehttps://github.com/signup?return_to=https://github.com/voidzero-dev/void/issues/337
Sign in to commenthttps://github.com/login?return_to=https://github.com/voidzero-dev/void/issues/337
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.