Why Your Blog Should Run on Cloudflare Workers: Edge Rendering for Speed and SEO

Most blog platforms run on origin servers. A request from Tokyo hits a server in Virginia, renders a PHP page, queries a database, and sends the response back across the Pacific. Caching helps, but the fundamental architecture is request → origin → response.

Edge rendering flips this model. The blog runs on Cloudflare Workers — JavaScript execution at 300+ data centers globally. A request from Tokyo hits a data center in Tokyo. The page renders there, with tenant routing from Cloudflare KV, images from R2, and caching at the edge. The response never leaves the continent.

This is not an incremental improvement. It is a different architecture with measurably different results. This post explains how it works and why it matters for blog SEO and user experience.

Architecture diagram showing edge rendering: browser request → nearest Cloudflare POP → Worker renders page with KV routing and R2 images → response from edge, no origin roundtrip
Edge rendering: requests never leave the region

The edge architecture

Modern Blogging runs on four Cloudflare primitives:

Component

Role

Latency contribution

Cloudflare Workers

Server-side rendering at the edge

< 15 ms compute

Cloudflare KV

Tenant routing (subdomain → config)

< 10 ms read

Cloudflare R2

Image and backup storage

< 30 ms (via CDN)

Cloudflare Cache API

Edge-cached full page responses

< 5 ms (cache hit)

The Worker handles the Next.js application via @opennextjs/cloudflare . On every request, it resolves the tenant from the hostname via KV, fetches content from the Sanity CDN, renders the page, and returns it. The Cache API stores rendered pages at the edge for subsequent requests.

Measured performance

These are real metrics from production blogs on the platform, not synthetic benchmarks:

Metric

Edge (Cloudflare Workers)

Traditional (PHP origin)

Improvement

TTFB (global median)

< 300 ms

800–2,000 ms

3–7× faster

FCP

< 900 ms

1,500–3,000 ms

2–3× faster

LCP

< 1,000 ms

2,000–5,000 ms

2–5× faster

CLS

0.000

0.05–0.3

Zero shift

Lighthouse Performance

95–100

50–80

Consistently green

The CLS of exactly 0.000 deserves attention. Layout shift is caused by content loading after the initial render — images without dimensions, fonts swapping, ads injecting. The edge-rendered architecture serves fully rendered HTML with explicit image dimensions and inline critical CSS. Nothing shifts.

Side-by-side Lighthouse scores showing 98-100 for edge-rendered blog versus 55-75 for traditional PHP blog across Performance, Accessibility, Best Practices, and SEO categories
Lighthouse comparison: edge-rendered vs traditional

How a request flows through the edge

Here is the exact sequence when a visitor loads a blog post:

  1. DNS resolution. The browser resolves yourblog.modernblogging.net to Cloudflare's anycast IP. The request routes to the nearest Cloudflare data center.
  2. Worker invocation. The Cloudflare Worker processes the request. It first checks the Cache API for a cached response.
  3. Cache hit (90%+ of requests). If the page is cached, the Worker returns it immediately. Total latency: DNS + cache lookup ≈ 50–100 ms.
  4. Cache miss. On a cache miss, the Worker proceeds with rendering.
  5. Tenant resolution. The Worker reads the subdomain from the hostname and looks up the tenant configuration in Cloudflare KV. This returns the Sanity project ID and other settings.
  6. Content fetch. The Worker fetches content from the Sanity CDN (which also uses a global CDN, so the fetch is fast).
  7. Server-side render. Next.js renders the page on the Worker. This produces fully hydrated HTML.
  8. Cache write + response. The Worker writes the rendered page to the Cache API (with appropriate TTL and cache tags) and returns it to the browser.

Subsequent requests for the same page skip steps 5–8 entirely. The cache hit rate on a blog with stable content is typically 90–95 %.

Multi-tenant routing with KV

Modern Blogging is a multi-tenant platform — thousands of blogs on one Cloudflare Worker. The routing challenge: given a hostname like techblog.modernblogging.net , how does the Worker know which Sanity project to fetch content from?

Cloudflare KV stores tenant routing data. On every request, the Worker reads subdomain:techblog from KV and gets back the encrypted tenant configuration (Sanity project ID, write token, plan details). KV reads are sub-10ms at the edge because KV replicates data to every Cloudflare data center.

This is simpler and faster than alternatives (database lookups, Redis clusters, DNS-based routing) and costs nothing at the scale of a blogging platform. KV's eventual consistency model is fine for tenant routing — blog configuration changes infrequently.

Image delivery with R2 and Cloudflare Images

Blog images are stored in Cloudflare R2 (S3-compatible object storage with zero egress fees). When a browser requests an image, the CDN serves it from the nearest edge location. Cloudflare Images ( /cdn-cgi/image/... ) resizes, reformats (WebP/AVIF), and compresses images on the fly:

html
<!-- Original image URL -->
<img src="https://pub-xxx.r2.dev/blog-images/cover.jpg" />

<!-- Optimized via Cloudflare Images -->
<img src="/cdn-cgi/image/width=800,format=auto,quality=80/
     https://pub-xxx.r2.dev/blog-images/cover.jpg" />

The Next.js <Image> component uses a custom Cloudflare image loader that generates these URLs automatically. Authors upload images to R2 through the dashboard or the upload_image MCP tool. Optimization is handled at the CDN edge, not at build time.

Zero egress fees matter at scale. AWS S3 charges $0.09/GB for egress. A blog serving 100 GB of images per month (not unusual for image-heavy content) saves $9/month on R2. For headless blog platforms serving many tenants, the savings compound.

Cache invalidation that actually works

The hardest part of caching is invalidation. When an author publishes a post, every cached page that lists that post (homepage, category page, sitemap) needs to update. The platform handles this with cache tags:

  • Per-page cache tags. Each cached page is tagged with identifiers for the content it includes: the tenant subdomain, the post slug, the category slug, the page type.
  • Targeted purge on publish. When a post is published or updated, the Worker purges cache entries matching the relevant tags. Only affected pages are invalidated.
  • Version-keyed cache keys. The Worker version is part of the cache key. Deploying a new Worker version automatically invalidates all cached pages (a full-site purge without explicit purge calls).

This is more sophisticated than the common approach (purge everything on any change) and avoids the CDN thundering herd problem where a full purge causes every page to be re-rendered simultaneously.

Why edge rendering matters for SEO

Google has been explicit: page speed is a ranking factor. Core Web Vitals (LCP, CLS, INP) directly affect search rankings. Edge rendering improves all three:

  • LCP (Largest Contentful Paint). Faster TTFB means the HTML arrives sooner. Server-rendered pages do not wait for JavaScript to load content. Combined effect: LCP under 1 second for most blog pages.
  • CLS (Cumulative Layout Shift). Server-rendered HTML includes explicit image dimensions and inline styles. Nothing shifts after the initial paint. The result: CLS of exactly 0.000.
  • INP (Interaction to Next Paint). Blog pages are primarily read-only. Minimal JavaScript means minimal interaction latency. Hydration is fast because the HTML is already correct.

The practical effect: blogs on edge rendering consistently score 95+ on Lighthouse Performance. WordPress blogs frequently score 50–80 even with caching plugins. This gap is structural — the architecture determines the floor.

ℹ️

Core Web Vitals and rankings: Google uses Core Web Vitals as a tiebreaker between pages with similar content quality. If your content is competitive but your page is slower, the faster page wins the ranking.

Edge rendering vs other architectures

Architecture

TTFB

Complexity

Cost

Example platforms

Edge SSR (Workers)

< 300 ms

Moderate

$0–5/mo

Modern Blogging

Static site (Jamstack)

< 200 ms

High (builds)

$0–20/mo

Hugo, Astro, 11ty

SSR + CDN cache

300–800 ms

High

$10–50/mo

Next.js on Vercel

Traditional SSR (PHP)

800–2,000 ms

Low

$5–50/mo

WordPress, Ghost

Client-side SPA

1,500+ ms

Moderate

$0–20/mo

Gatsby, Create React App

Static sites can be faster on cached pages, but they require a build step on every content change. A blog with 1,000 posts takes minutes to rebuild on static platforms. Edge SSR has no build step — publish a post and it is live immediately. For automated publishing workflows, that immediacy matters.

Architecture is not a feature — it is a foundation

You do not choose a blog platform based on its architecture. You choose it based on what that architecture enables: fast pages, good SEO scores, reliable performance, and zero maintenance. Edge rendering on Cloudflare Workers provides all four.

If performance and SEO are priorities for your blog — and for any blog trying to rank in search , they should be — the architecture under the hood matters more than the theme on top.

Start a free blog and check the Lighthouse score yourself. The numbers speak for the architecture.

Share this post
𝕏in
Built with Modern Blogging

This article was written, styled, and published using the Modern Blogging platform. Launch your own fast, SEO-ready publication in minutes.

Start for free →