Repository navigation
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Design proposal
Proposal: proposals/cloudflare-site-durable-object.md
On Workers with D1, uncached pages are slow for two reasons: 14 to 25 D1 queries per page at about 17 ms each, and cold isolates on low-traffic sites (1.1 to 2.4 s in my tests). This RFC proposes an opt-in mode in
@emdash-cms/cloudflarewhere the Astro app and the site's SQLite database run in the same Durable Object, behind a tiny front Worker that owns the Workers Cache. D1 stays the default, and the existingdurableObjects()adapter is unchanged.I've run three sites this way since November 8 on stock EmDash 1.4.0. The uncached HTML median went from 2,837 to 291 ms on scllauerz.ch, 726 to 204 ms on kevinkyburz.ch and 1,184 to 450 ms on linguadash.dev. The RFC covers the trade-offs (one region for all misses, one thread per site, sandboxed plugins, backups, deploys) and lists 18 open questions. Six of them must be settled before acceptance. Full measurements: https://kevinkyburz.ch/blog/emdash-durable-object/
Proposal type
Related work
Discussion: #4789
Depends on #4406 and #4725 (sandbox plugin bridge uses the configured database, #1623). Touches co-editing on Cloudflare (#4680) and media cache headers (#4498). No conflicting accepted proposals.
Readiness
accepted(check only when ready to merge)AI assistance