Edge functions in 2026 — Cloudflare, Vercel, Deno — what's worth it

Edge functions promised global low-latency compute close to users. Three years in, the real-world performance picture is mixed. Practical guide to which platforms deliver, which workloads benefit, and which should stay regional.

Edge functions hit mainstream in 2022-2023 with the promise of running code globally close to users. Three years in, the real-world picture is messier than the pitch. Some workloads see huge wins. Many see no improvement. A few are actively worse than traditional regional servers.

The three major platforms

Cloudflare Workers

V8 isolates running on Cloudflare's CDN. 300+ locations. Cold start measured in microseconds.

Strengths: ubiquitous edge presence, fastest cold starts, integrated KV/D1/R2 storage, generous free tier.

Weaknesses: V8 sandbox limits some libraries, no native Node APIs (workers compatibility helps but not perfect).

Vercel Edge Functions

Built on Cloudflare's infrastructure (or similar). Tied to Vercel ecosystem.

Strengths: smooth Next.js integration, mature DX, Edge Config for fast lookups.

Weaknesses: locked into Vercel pricing, limited to Vercel's deploy model.

Deno Deploy

V8 isolates with Deno's standard library. 30+ locations.

Strengths: TypeScript native, modern API standards, Deno KV for storage.

Weaknesses: smaller location footprint, ecosystem narrower than Cloudflare's.

Real workload comparisons

Static API responses (auth checks, redirects, A/B variant)

Edge wins decisively. 20-50ms global response vs 100-300ms regional. Cloudflare Workers excellent for this.

API gateway (validation, rate limiting, header rewriting)

Edge wins. Run validation before reaching origin.

Database queries

Edge usually loses. Your database is in one region. Edge calls have to round-trip there. Faster to put compute next to data.

Exception: read-only data replicated to edge KV. Cloudflare D1 (SQLite at edge) makes this practical.

LLM/AI inference

Mixed. Cloudflare Workers AI runs models at edge — works for small models. Larger inference still goes to GPU clusters.

Heavy computation

Edge loses. CPU limits per request, memory limits, time limits. Move to regional functions or containers.

WebSocket and real-time

Edge works for fanout. Cloudflare Durable Objects coordinate state per geographic region.

The cold-start mistake

People obsess over cold starts. V8 isolates have negligible cold starts. AWS Lambda cold starts (100-500ms) are different beasts.

Optimizing for edge to avoid Lambda cold starts often means moving from a problem you have to a different set of problems.

Database access patterns

Edge functions calling a regional database often perform worse than regional functions:

  • Connection setup latency from each edge location to regional DB.
  • Connection pool exhaustion (one pool per edge location).
  • No connection reuse between requests in some isolates.

Solutions:

  • HTTP-based databases (PlanetScale, Neon serverless driver, Supabase) — connection per request, designed for edge.
  • Edge-native storage (Cloudflare D1, KV; Vercel Edge Config).
  • Don't query database from edge — keep that in regional functions.

Cost reality

Edge per-request costs are often lower than regional Lambda. But:

  • Database round-trips can dominate request budget.
  • External API calls from edge cost outbound bandwidth.
  • Cloudflare's free tier is generous, others less so.

Real comparison requires modeling actual workload, not benchmark numbers.

When to choose edge functions

  • Static logic with no/minimal database needs.
  • Global user base where latency matters per-region.
  • Auth checks, redirects, A/B routing.
  • API gateway functions before reaching origin.
  • Workloads using edge-native storage (KV, D1).

When to stay regional

  • Heavy database access.
  • Users mostly in one region anyway.
  • Compute-heavy work (image processing, ML inference).
  • Long-running operations.
  • Strong consistency requirements with regional databases.

Hybrid pattern

Most real applications use both:

  • Edge functions for hot paths: auth, routing, caching, gateway.
  • Regional services for database-heavy work and stateful logic.
  • Edge → regional handoff at clear boundaries.

Verdict

Edge functions are a genuine performance win for static, database-free work serving a global audience. They lose on database-heavy workloads where regional compute wins. Cloudflare Workers leads on technical merit and ecosystem; Vercel Edge is fine if you're already on Vercel; Deno Deploy is competitive for TypeScript-native shops. Use edge for the hot path, regional for the work.

Learn more about our competence
Web development, AI, automation — what we build and how.