Cloudflare Workers + Pages
Nasz werdykt
Jurysdykcja UE, przewidywalny koszt, najniższy TTFB w naszym europejskim ruchu.
Brief praktyka
Why we adopted it
We moved wppoland.com and four client sites off Vercel onto Cloudflare Pages plus Workers across Q4 2025 and Q1 2026. TTFB from Warsaw, Frankfurt, Lisbon, and Oslo settled at a 38 ms median (Pages) and 52 ms (Workers) versus 110 ms on Vercel's edge from the same probes. Cold-start floor on Workers sits sub-5 ms on V8 isolates (Kenton Varda's model); Lambda@Edge floats between 200 and 900 ms cold. NIS2 plus DORA Article 28 reporting is cleaner when request, cache, and data layer (D1, KV) sit inside the EU.
When we reach for it
Edge-static plus serverless API: Astro 5 with selective islands, Next.js via OpenNext, backends whose hot path is JWT plus a small upstream fan-out. KV / D1 / R2 / Durable Objects replaces Postgres plus Redis plus S3: KV for read-heavy config, D1 for relational data under 10 GB, R2 for media without egress, Durable Objects for single-writer consistency. Not for Workers: native modules without a workerd build, above 128 MB per request, long-running jobs.
Upgrade path
From Vercel: the painful migration is the framework adapter, not the runtime. Next.js teams use OpenNext, Astro teams use @astrojs/cloudflare. Expect to rewrite code that reads process.env at module top-level (Workers have no Node process at import time; secrets arrive via env on the request). From AWS Lambda plus CloudFront: anything beyond nodejs_compat's stdlib surface will hurt. Budget two days per 10 endpoints, a week for the JWT layer (jose with JWK cached in KV). IAM signed-request flows assuming an instance role do not transfer.
Two production scars
First, the _redirects 100 KB silent-truncation bug bit us in February 2026: file shipped, build warning missed, tail rules dropped at deploy. 52 legacy URLs 404'd in production. Fix: bulk rules moved into functions/redirect-map.ts, _redirects capped at ~1800 rules. Second, Durable Objects plus D1 plus a hot key on a giveaway page: one DO hit the concurrency limit and stalled writes for 30 seconds. Fix: shard the DO key by user-ID hash into 32 instances; D1 read replicas for reads. Greg Brimble's DO-sharding tutorial is the reference.
What we are watching
Cloudflare Containers reached open beta at Developer Week 2025 (Rita Kozlov's announcement); we are piloting it for a sharp-plus-libvips workload, but the cold-start floor sits closer to a managed container than to Workers. Workflows (durable execution) hit GA in 2025; we are migrating one cron-plus-queue chain into it (cloudflare/workers-sdk#5837). We are watching whether R2 SQL plus Iceberg stabilises enough that analytics stops needing a warehouse.
Dodano: 2026-04-26 · Ostatni przegląd: 2026-04-26