Edge computing is going from buzzword to architecture reality. Here's what it actually means and why you should care.
Traditional web app request flow:
User in Mumbai
→ Request to server in Virginia (200ms)
→ Server processes request
→ Response back to Mumbai (200ms)
→ Total: 400ms+ latency
Edge computing puts compute closer:
User in Mumbai
→ Request to Mumbai edge node (~5ms)
→ Edge runs your code
→ Response (~5ms)
→ Total: 10-20ms latency
This isn't theoretical — it's 20x real-world improvement.
Edge != CDN (though CDNs were the first edge)
| Layer | What It Does | Example |
|---|---|---|
| CDN | Cache and serve static assets | Cloudflare, AWS CloudFront |
| Edge Functions | Run code at edge nodes | Cloudflare Workers, Vercel Edge |
| Edge DB | Data available at the edge | Cloudflare D1, PlanetScale |
// Runs in 300+ locations globally
// Cold start: ~0ms (always warm)
export default {
async fetch(request, env, ctx) {
const url = new URL(request.url);
// A/B test at the edge — no origin needed
if (Math.random() < 0.5) {
return new Response('Variant A');
}
// Geo-routing at the edge
const country = request.cf?.country;
if (country === 'IN') {
return Response.redirect('https://in.yourapp.com');
}
return fetch(request); // Pass through to origin
}
};For global apps with latency-sensitive operations: Yes. For apps with 90%+ of users in one region: Often not.
Edge is a tool, not a default architecture. Apply it where latency actually matters.