Cloud computing keeps moving the compute closer to the user, and further away from anything you'd call "a server." First it was containers. Then it was Functions-as-a-Service. Now it's edge runtimes running your code in hundreds of locations worldwide, milliseconds from wherever your user happens to be.
If you've been out of the loop for even a year, the landscape has shifted. Let's break down what's actually happening in serverless and edge computing right now, with real code you can run today.
Why "Serverless" Still Matters
Serverless was never about the absence of servers — it's about the absence of your responsibility for them. No patching, no scaling groups, no idle capacity burning money at 3 AM. You ship a function, the platform handles the rest.
The three big players in this space right now:
- AWS Lambda — the original, still the most mature, deeply integrated into the AWS ecosystem
- Cloudflare Workers — V8 isolates instead of containers, near-instant cold starts, deployed to 300+ cities
- Edge runtimes (Vercel Edge Functions, Deno Deploy, Fastly Compute) — increasingly the default for latency-sensitive web apps
AWS Lambda: Still the Workhorse
Lambda remains the safe, battle-tested choice, especially if you're already living in AWS. Here's a minimal Lambda function handling an API Gateway request:
export const handler = async (event) => {
const name = event.queryStringParameters?.name || "world";
return {
statusCode: 200,
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ message: `Hello, ${name}!` }),
};
};
Deploy it with the AWS CLI or SAM:
sam build
sam deploy --guided
Lambda's strength is depth — VPC access, deep IAM integration, EventBridge triggers, Step Functions orchestration. Its weakness is cold starts and the fact that your function is still tied to a specific AWS region unless you architect around it.
Cloudflare Workers: Compute at the Edge
Workers run in V8 isolates, not containers, so cold starts are effectively gone — we're talking sub-millisecond startup. That changes the calculus for anything latency-sensitive.
export default {
async fetch(request, env, ctx) {
const url = new URL(request.url);
if (url.pathname === "/api/greet") {
const name = url.searchParams.get("name") || "world";
return Response.json({ message: `Hello, ${name}!` });
}
return new Response("Not found", { status: 404 });
},
};
Deploying is refreshingly simple with Wrangler:
npm install -g wrangler
wrangler deploy
Workers also give you KV, Durable Objects, and R2 storage — all callable from inside the same isolate, no extra network hop to a separate cloud service.
Edge Runtimes: Where Everything Is Converging
What used to be a Cloudflare-only trick is now everywhere. Vercel's Edge Functions, Deno Deploy, and Fastly Compute all run on similar isolate-based models. The pattern that's emerging:
// Vercel Edge Function example
export const config = { runtime: "edge" };
export default async function handler(request) {
const { searchParams } = new URL(request.url);
const name = searchParams.get("name") ?? "world";
return new Response(JSON.stringify({ message: `Hello, ${name}!` }), {
headers: { "content-type": "application/json" },
});
}
Notice how similar this looks to the Workers example. That's not an accident — the Web platform's Request/Response APIs have become the de facto standard interface across edge providers, which means portability between them is far easier than it used to be between traditional cloud functions.
Picking the Right Tool
A rough mental model that's held up well for me:
| Use Case | Best Fit |
|---|---|
| Heavy backend logic, DB writes, long-running jobs | AWS Lambda |
| Auth checks, redirects, A/B testing, personalization | Cloudflare Workers / Edge Functions |
| Static site with dynamic bits | Edge runtime + static hosting |
| Complex multi-service orchestration | AWS (Lambda + Step Functions) |
If you're building out a resource library or internal tooling to track which functions live where and how they're wired together, a software hub is genuinely useful for keeping a team aligned as the architecture spreads across providers — it's easy to lose track once you've got Lambda functions, Workers, and edge middleware all doing different jobs.
A Quick Hybrid Example
You don't have to pick one. A common pattern in 2026: Cloudflare Workers at the edge for auth/caching/redirects, forwarding the heavier requests to AWS Lambda.
export default {
async fetch(request, env) {
const cacheKey = new Request(request.url, request);
const cache = caches.default;
let response = await cache.match(cacheKey);
if (response) return response;
// Forward to Lambda for the real work
response = await fetch("https://your-api-gateway-url.amazonaws.com/prod/data", {
headers: request.headers,
});
response = new Response(response.body, response);
response.headers.append("Cache-Control", "s-maxage=60");
await cache.put(cacheKey, response.clone());
return response;
},
};
This gets you edge-level caching and instant responses for repeat requests, while keeping your core business logic in a mature, well-understood environment.
Wrapping Up
Serverless isn't a single thing anymore — it's a spectrum from "fully managed function in a region" to "code running in isolates in every city on earth." Most real-world architectures in 2026 end up blending both: Lambda (or similar) for heavy lifting, edge runtimes for anything latency-sensitive.
Start small. Pick one function you already have, and try porting it to a Worker or edge function. You'll feel the cold-start difference immediately, and it'll tell you a lot about where the rest of your architecture should go.
If you're mapping out your own cloud architecture, check out our *Serverless Architecture Guide** for a deeper dive into cost modeling and multi-provider strategies.*
Top comments (0)