Tech Economy

Cloudflare Workers vs Vercel Edge Functions: Cold Start and Latency

Cloudflare Workers vs Vercel Edge Functions: Cold Start and Latency

Cold starts killed your product once. Don’t let them do it again.

The edge computing conversation shifted dramatically over the past 18 months. What started as a theoretical performance advantage — “run code closer to your users!” — collided hard with production reality. Developers benchmarking Cloudflare Workers vs. Vercel Edge Functions discovered that headline numbers don’t always match what users actually experience. And with Cloudflare D1 hitting general availability and Vercel’s edge runtime maturing through 2025 into early 2026, the gap between platforms has both widened and narrowed in ways that aren’t obvious until you stress-test them.

The thesis is simple: Cloudflare Workers wins on raw cold start performance and global data locality with D1. Vercel Edge Functions win on developer experience and Next.js integration. The right choice depends entirely on your data access pattern — not your framework preference.

This covers four things: why cold start latency numbers are often misleading, the actual performance difference between Workers and Vercel Edge in 2026, how SQLite/D1 changes the calculus for data-heavy edge deployments, and a concrete decision framework for picking the right platform.

Key Takeaways

  • Cloudflare Workers consistently cold-start in under 5ms globally. Vercel Edge Functions average 50–150ms depending on region and runtime size, according to community benchmarks published on r/webdev in late 2025.
  • Cloudflare D1 (SQLite at the edge) reached general availability in mid-2025 with read replication across 200+ PoPs — making it a production-viable option for read-heavy workloads.
  • Vercel’s edge runtime still restricts the Node.js API surface significantly, forcing developers into polyfill-heavy setups that inflate bundle sizes and worsen cold start performance.
  • SQLite on the edge in 2026 is production-ready for reads. Write-heavy applications still face consistency trade-offs that PostgreSQL-based solutions handle better.

How Edge Runtimes Got Here

Three years ago, “edge functions” meant Cloudflare Workers and not much else. Workers launched in 2017 and spent years as the scrappy alternative to Lambda@Edge. The V8 isolate model — no containers, no Node.js process spin-up — gave Cloudflare a structural cold start advantage that competitors couldn’t easily replicate.

Vercel entered the edge function space seriously around 2022 with its Edge Runtime, built on the same V8 isolate concept but wired tightly into the Next.js deployment pipeline. The pitch was compelling: keep your Next.js middleware and API routes, deploy them globally at the edge, zero configuration. Developers loved the experience. The performance benchmarks were mixed.

By 2025, the ecosystem matured fast. Cloudflare released D1 — a globally replicated SQLite database designed to sit next to Workers — into GA. Vercel responded with tighter KV and Postgres integrations through its Storage products. The data layer question, previously an afterthought in edge discussions, became the central battleground.

The debate stopped being theoretical. Real production apps were choosing sides, and the trade-offs became measurable.


Cold Start Reality: What the Numbers Actually Mean

Cold start latency is where Cloudflare holds a structural advantage. Workers use V8 isolates — lightweight execution contexts that spin up in microseconds rather than milliseconds. According to Cloudflare’s infrastructure documentation, Workers cold starts typically fall under 5ms globally. Community benchmarks on r/webdev corroborate this, with developers reporting consistent sub-5ms cold starts across North America, Europe, and Asia-Pacific.

Vercel Edge Functions also run on V8 isolates, but the runtime layer adds overhead. Bundle size matters a lot here. Vercel’s Edge Runtime restricts Node.js APIs — no fs, limited crypto, no native addons — which sounds like it would keep bundles small. The opposite often happens. Developers polyfill missing APIs, inflating bundle size and pushing cold starts into the 50–150ms range for non-trivial functions.

Warm request latency is a different story. Once both platforms are warm, performance differences shrink considerably. The cold start gap matters most for low-traffic endpoints, scheduled functions, and geographic regions where your app sees sporadic load. For high-traffic warm paths, the difference is largely academic.

D1 and SQLite at the Edge: The Data Gravity Problem

Cloudflare D1 general availability changed the edge database conversation. D1 is SQLite — specifically, a fork with WAL-mode replication across Cloudflare’s 200+ points of presence. For Workers, D1 queries happen in the same PoP as the executing function. That means a Workers + D1 read query can complete in under 2ms of internal latency, according to Cloudflare’s D1 documentation.

SitePoint’s 2026 analysis on SQLite edge production readiness confirms D1 handles read-heavy workloads well — content APIs, user preference lookups, catalog data. Writes are a different matter. D1 routes all writes to a primary location, introducing 50–200ms of additional latency depending on geographic distance from that primary. For globally distributed apps with heavy write workloads, that hurts.

Vercel doesn’t have a comparable SQLite offering. Its storage products connect to Postgres via Neon or Vercel Postgres, Redis-compatible KV, and Blob storage. These work, but they introduce network round-trips. A Vercel Edge Function in Frankfurt hitting a Neon Postgres instance in us-east-1 adds 80–120ms per query. That negates most of the edge performance benefit you deployed for in the first place.

Bundle Size and Runtime Constraints

This is the hidden variable most benchmarks ignore.

Cloudflare Workers support the Workers runtime — a WinterCG-compliant environment with Web APIs and Cloudflare-specific bindings. The 1MB compressed bundle limit is strict but workable for most use cases. Workers can also run WASM modules directly, opening doors for high-performance workloads.

Vercel Edge Runtime’s API surface restrictions force difficult choices. Need a library that touches Buffer or Node’s stream API? You’re either polyfilling it or rewriting around it. Popular ORMs like Prisma required significant rework to function in Vercel’s edge environment — Prisma’s edge-compatible client only landed in stable form in mid-2025. That’s a real cost in engineering time that doesn’t show up in benchmark posts.

Platform Decision Matrix

CriteriaCloudflare Workers + D1Vercel Edge Functions
Cold Start (typical)< 5ms50–150ms (varies by bundle size)
Global PoPs200+~70 (via AWS regions)
SQLite/Edge DBD1 (native, GA)None (Postgres via external)
Node.js CompatibilityWinterCG (partial)Edge Runtime (restricted)
Next.js IntegrationGood (via adapter)Native, first-class
Bundle Size Limit1MB compressed4MB compressed
Pricing ModelRequests + CPU timeExecution units
Write Latency (DB)50–200ms (D1 primary)80–150ms (external Postgres)
Best ForGlobal read APIs, SQLite workloadsNext.js apps, DX-first teams

Both platforms deliver real edge performance for the right use cases. Workers + D1 wins on raw latency and data locality. Vercel wins on workflow integration for Next.js teams.

The trade-off worth internalizing: Vercel’s developer experience is genuinely better for teams already in the Next.js ecosystem. But that DX comfort costs you cold start performance and forces you to manage external database latency. Workers requires more infrastructure thinking upfront — but delivers lower p99 latency in production.


Three Scenarios Worth Thinking Through

Scenario 1 — Read-heavy content API with global traffic. Workers + D1 is the clear winner. D1’s read replication means sub-2ms database access at every PoP. A global CDN-layer content API serving 50M requests/day fits this pattern perfectly. Cloudflare’s pricing model at this scale is also meaningfully cheaper than Vercel’s execution-unit model.

Scenario 2 — Next.js app with edge middleware for auth and personalization. Vercel wins here. The native integration between Next.js middleware and Vercel Edge eliminates deployment complexity. If the middleware logic doesn’t touch a database — JWT validation, feature flags from KV — the cold start difference is tolerable. Auth middleware rarely hits cold starts on high-traffic paths anyway.

Scenario 3 — Hybrid app with write-heavy transactional data plus global reads. Neither platform solves this cleanly today. The pragmatic pattern in 2026: use Workers + D1 for read paths, route writes to a primary Postgres instance (PlanetScale, Neon, or Supabase) via a separate regional API. More infrastructure, but it matches data gravity to access patterns correctly.

Watch for PlanetScale’s Branching + edge caching product and Turso’s SQLite replication improvements — both are targeting the write-latency problem directly and could shift this analysis by Q4 2026.


Where This Goes Next

Cold start latency in 2026 favors Cloudflare Workers structurally. The V8 isolate model, geographic distribution, and D1’s native read replication create a performance profile Vercel can’t match on infrastructure alone. But Vercel’s edge functions remain the pragmatic choice for Next.js-first teams — the DX advantage is real, and cold starts matter less than developers assume for high-traffic, warm-path requests.

Over the next 6–12 months: Cloudflare will push D1 write performance improvements and expand the Workers AI + D1 integration surface. Vercel will likely announce tighter SQLite-compatible storage to close the data locality gap. WinterCG compliance will become a vendor-neutral benchmark — watch how quickly each platform’s runtime scores improve. The cold start debate will evolve into a data layer debate more than a runtime debate.

The actionable move: benchmark your specific bundle size and database access pattern before committing. Cold start numbers in isolation are marketing. Your p95 latency under real load is the number worth chasing.

What’s your current data access pattern at the edge — mostly reads, writes, or mixed? That answer determines which platform actually wins for you.

References

  1. r/webdev on Reddit: Vercel Edge vs Cloudflare Workers: My Benchmarks Show Theo (T3) Might Be Fooling
  2. Serverless Functions: Vercel Edge & Cloudflare Workers Guide
  3. Post-PostgreSQL: Is SQLite on the Edge Production Ready?

Photo by Robynne O on Unsplash