Edge Computing and Serverless: The 2025 Picture
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
| Concern | Lambda / Cloud Run | Edge runtime |
|---|---|---|
| Cold start | 100–500 ms (Node), 1–3 s (Java) | < 5 ms |
| Max execution | 15 min | 30 s wall, 30–50 ms CPU on free tiers |
| Memory | up to 10 GB | 128 MB typical |
| Filesystem | /tmp | none / virtual |
| Native modules | yes | rarely (Wasm only) |
| Database access | direct VPC peering | via HTTP / Hyperdrive / connection poolers |
| Multi-region | manual | automatic |
Where edge actually wins
- Auth and routing —
Set-Cookie, JWT verification, A/B test buckets. - Static-site dynamism — geolocated content, redirects, image transforms.
- API caching layer — store-and-revalidate close to users.
- 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 →