Services

Cloudflare Performance Final Review 2026 06 16


Cloudflare performance final review — 2026-06-16

Scope: final decision-ready review after the evidence refresh, hosting-options validation, and performance audit. Documentation-only; no product code changes are recommended.

Decision#

The current recommendation still stands: keep the existing split architecture.

  • Keep apps/www and apps/manager on Cloudflare Pages.
  • Keep apps/blog, apps/docs, apps/academy, apps/design-system, and apps/ui-library on Cloudflare Workers with OpenNext and Workers Assets.
  • Keep Go APIs, Postgres, and Meilisearch on the existing self-hosted/backend infrastructure.
  • Do not migrate production Go services, auth/billing state, or transactional data to Cloudflare edge primitives now.

Changes from the earlier synthesis#

  • Treat the Turbo dry-run crash in docs/performance-audit-2026-06-16.md as historical. The evidence refresh reports current www build/test Turbo dry-runs completed successfully.
  • Keep the missing docs/runtime/S02-RUNTIME-PROOF.md as an active documentation/evidence gap.
  • Do not include apps/admin or apps/studio in the Cloudflare-hosted surface without new Wrangler/OpenNext/release-task evidence.
  • Correct task references should use the current academy naming (cf:build:academy); stale cf:build:learn references should not be used.

Priority next steps#

  1. Restore, relocate, or update the missing runtime-proof evidence referenced by root documentation.
  2. Run and record per-app Cloudflare build evidence, including Worker script size and asset size for Worker/OpenNext apps.
  3. Add enforceable bundle/Worker-size budgets for Cloudflare apps, especially blog, docs, design-system, and ui-library.
  4. Add lightweight Lighthouse or Web Vitals checks for representative deployed routes.
  5. Validate route and cache correctness after deploy, especially www.assistance.bg/docs*, /_next/static/*, image assets, /api/*, and personalized paths.
  6. Add Cloudflare services only where product fit is clear: Turnstile for public forms/auth-adjacent flows, Queues for async jobs, and R2/Images/Containers only through scoped pilots.

Validation commands#

bash
1
# Current architecture builds
2
mise run cf:build:www
3
mise run cf:build:manager
4
mise run cf:build:blog
5
mise run cf:build:docs
6
mise run cf:build:academy
7
mise run cf:build:ds
8
mise run cf:build:ui
9
10
# Credential and deployed-health checks
11
mise run cf:deploy:preflight
12
mise run cf:health
13
14
# Docs search validation
15
mise run cf:index:search
16
17
# Optional aggregate build, when host capacity is sufficient
18
mise run cf:build

Additional manual validation:

  • Use preview deploys or wrangler deploy --dry-run where supported for Worker apps.
  • Inspect deployed response headers for static assets, images, SSR pages, API routes, and personalized paths.
  • Confirm apps/www service bindings still resolve to assistance-blog and assistance-docs.
  • Smoke www.assistance.bg/docs* after any Pages or Worker route change.

Unresolved risks#

  • OpenNext Workers can still fail at runtime on unsupported Node APIs, native dependencies, large bundles, or long-running work.
  • Build-time TypeScript errors are ignored in some production builds, so separate typecheck/test gates remain important.
  • Broad Next build concurrency can still stress CI/build hosts even though current dry-run evidence improved.
  • Cache rules can leak or stale personalized/API data if broadened without deployed-header validation.
  • D1 and KV remain appropriate for docs search and OpenNext cache, not for Postgres-backed auth, billing, or transactional state.
  • Cloudflare Containers remain a pilot-only option until latency, error rate, secrets, logs/metrics, DB connectivity, and rollback are proven.

Final recommendation#

Proceed with validation, not migration. The existing Pages plus Workers/OpenNext frontend topology and self-hosted Go backend stack is the lowest-risk production architecture supported by current repo evidence.