What Is Edge Computing?
10 min read
The Problem with Centralised Servers
A traditional server sitting in us-east-1 adds 150-300ms of network latency for users in Singapore or São Paulo. That latency is irreducible — it is the speed of light across fibre. Edge computing eliminates it by running code in data centres located physically near the user.
Edge vs CDN vs Serverless
- CDN — caches static assets (HTML, CSS, images) at edge nodes; no dynamic computation
- Edge functions — run compute (JavaScript, WASM) at edge nodes; dynamic but within constraints
- Serverless (Lambda, Cloud Run) — full Node.js/Python runtime in a central region; flexible but slower cold starts and higher latency
- Edge — sub-millisecond cold starts, global distribution, V8 isolates (not full OS process)
The Edge Runtime Constraints
Edge functions run in V8 isolates — sandboxed JavaScript environments. They are not full Node.js. Key limitations:
- No Node.js built-ins (no fs, no net, no child_process)
- No long-running connections (WebSockets are supported on Cloudflare; not on all platforms)
- CPU time limits (typically 50ms on Vercel Edge, unlimited on Cloudflare Workers)
- Memory limits (128MB typical)
- Subset of Web APIs — fetch, crypto, TextEncoder, URL, Request, Response are available
Edge isolates are like browser tabs that run on servers. You get the Web APIs you know from the browser, but not the full server-side runtime.
When to Use the Edge
- Personalisation and A/B testing at the CDN layer (before the page is served)
- Authentication and access control (JWT validation at the edge)
- Geolocation-based routing (serve different content by country)
- API rate limiting and bot protection
- Short, latency-sensitive computations that don't need a database round-trip
Not everything belongs at the edge. Database queries, complex computation, and long-running tasks still belong in a regional server. Edge is a complementary layer, not a replacement.