Repository navigation
perf(sites): Cloudflare purge adapter and real-user Web Vitals (#74) - #145
Merged
Merged
Conversation
This was referenced Oct 25, 2026
clbotdev
force-pushed
the
perf/sites-edge-cache
branch
from
October 25, 2026 07:48
11dd1a8 to
a50b225
Compare
clbotdev
force-pushed
the
perf/sites-hosted-cdn
branch
from
October 25, 2026 07:48
62b1c9a to
484d99d
Compare
- EDGE_PURGE_ADAPTER=cloudflare purges Cache-Tag tags in the zone that custom hostnames live in, in batches of 30, through the same outbox as the http adapter. - Public pages send their Core Web Vitals in one anonymous beacon to the API's POST /rum (SITE_RUM=off disables it). The API exports them as Prometheus histograms by route kind and edge cache status, which is read from Server-Timing (the Varnish recipe now adds edge;desc=HIT|MISS). /metrics also reports pending cache invalidations. - deploy/monitoring: a Grafana dashboard for the §9 targets: edge hit ratio, TTFB p75 on hits, LCP/INP/CLS p75 by route, pending invalidations. - docs/site-delivery.md §7a: the vendors compared against the #74 criteria, with a recommendation and the custom-domain TLS options.
clbotdev
force-pushed
the
perf/sites-edge-cache
branch
from
October 25, 2026 08:15
a50b225 to
39893aa
Compare
clbotdev
force-pushed
the
perf/sites-hosted-cdn
branch
from
October 25, 2026 08:15
484d99d to
8948043
Compare
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.
Part of #75 and #74. Stacked on #144, which is stacked on #143. Retarget to
mainonce those merge.This covers the parts of #74 that don't need a vendor account. Choosing the vendor and where custom-domain TLS lives are your calls: a comparison and recommendation are in
docs/site-delivery.md§7a. Nothing here is active until you configure it.Changes
EDGE_PURGE_ADAPTER=cloudflare(CLOUDFLARE_ZONE_ID,CLOUDFLARE_API_TOKEN). PurgesCache-Tagtags in the zone that custom hostnames live in, in batches of 30, behind the Phase 3 interface and outbox (retries, 10 s repeat). FrontLit already emitsCache-Tag, so nothing else changes.POST /rumon the API. It has its own in-memory per-client limit and is disabled withSITE_RUM=off.site_web_vitalhistograms by route kind and edge cache status, read fromServer-Timing:edgefrom the Varnish recipe, which now adds it, orcfCacheStatus.site_page_loads_total, for the hit ratio./metricsalso reportssite_cache_invalidations_pendingand the oldest pending invalidation's age.deploy/monitoring: a Grafana dashboard for the §9 targets (edge hit ratio > 95%, TTFB p75 on hits < 100 ms, LCP/INP/CLS p75 by route, pending invalidations), plus PromQL examples.Testing
site_web_vitalseries withcache="HIT"/"MISS", including INP from a click./blogwas correctly a MISS right after a purge.