Edge Computing and Serverless: The 2025 Picture

‱
DataFmt Team
‱
#serverless #edge #cloudflare #lambda #infrastructure
5 min read

Edge Computing and Serverless: The 2025 Picture

The line between “serverless” and “edge” blurred in 2024. Here is what each platform actually offers and how to choose.

The two big models

Function-as-a-Service (FaaS) — AWS Lambda, Google Cloud Run, Azure Functions. Container-based, single-region, generous CPU and memory, slower cold starts.

Edge runtimes — Cloudflare Workers, Vercel Edge, Deno Deploy, Fastly Compute. V8 isolates or Wasm, multi-region by default, sub-millisecond cold starts, strict CPU limits.

Comparison

ConcernLambda / Cloud RunEdge runtime
Cold start100–500 ms (Node), 1–3 s (Java)< 5 ms
Max execution15 min30 s wall, 30–50 ms CPU on free tiers
Memoryup to 10 GB128 MB typical
Filesystem/tmpnone / virtual
Native modulesyesrarely (Wasm only)
Database accessdirect VPC peeringvia HTTP / Hyperdrive / connection poolers
Multi-regionmanualautomatic

Where edge actually wins

  1. Auth and routing — Set-Cookie, JWT verification, A/B test buckets.
  2. Static-site dynamism — geolocated content, redirects, image transforms.
  3. API caching layer — store-and-revalidate close to users.
  4. Personalization — read a header, swap a fragment, ship the response.

Where edge struggles

  • Heavy CPU work (image processing, ML inference) — limits hit fast.
  • Long-lived database connections — most edge runtimes don’t allow raw TCP.
  • Workloads needing big native dependencies (FFmpeg, headless Chrome).

The hybrid pattern

Modern stacks combine both:

  • Edge in front: routing, auth, cache, personalization.
  • Region behind: heavy compute, database queries, background jobs.

Frameworks like Next.js, SvelteKit, Astro and Remix make this split declarative — you just label routes edge or nodejs and the platform handles deployment.

Cost models worth knowing

  • Cloudflare Workers: pay per request + per CPU ms — predictable, no per-GB-second.
  • Lambda: pay per request + per GB-second — hostage to memory configuration.
  • Cloud Run: pay per request + container time — scales to zero, generous concurrency.

A common surprise: a busy Lambda can be 3–10× more expensive than the same workload on Cloud Run, because Lambda bills per-invocation memory time.

TL;DR

Use edge runtimes for the request perimeter and regional FaaS or containers for the heavy lifting. Measure cold starts, P99 latency and bill — not vendor claims.

Found this helpful? Try our free tools!

Explore Our Tools →