What edge computing is
In the classic architecture the browser requests a page, the request travels to a data centre that may be thousands of kilometres away, the server builds a response and the response comes back. Even with a fast server, physical distance costs time.
Edge computing breaks that pattern. The code runs on the CDN node nearest the visitor. A request from Berlin is handled at the Berlin point of presence instead of flying to Amsterdam or Singapore.
Classic: Browser → CDN (cache) → Server → Response ~100–300 ms
Edge: Browser → Edge function (CDN) → Response ~1–10 ms
Platforms and runtimes
| Platform | Runtime | Notes |
|---|---|---|
| Cloudflare Workers | V8 isolates | The lowest latency, 200+ points of presence |
| Vercel Edge Functions | V8 / Next.js | Integrated with Next.js middleware |
| AWS Lambda@Edge | Node.js / Python | Flexible, but higher latency |
| Fastly Compute | WebAssembly | Any language, through WASM |
Edge computing and personalization
For e-commerce, edge functions earn their place in three scenarios:
A/B testing with no content flicker. The split between variants happens at the edge before the HTML is served. There is no JavaScript swap after load, so there is no flash of the wrong content.
Geotargeting and redirects. Working out the visitor’s country and sending them to the right language domain takes 1–2 ms at the edge, against 50–100 ms with a trip to the origin.
Personalized titles and meta tags. Changing the title, description or og:image by segment to improve click-through from social platforms.
Important: heavy ML work — recommendations, ranking — does not run at the edge. The edge function only collects an already computed result from the CDN cache or a key-value store and drops it into the response. The model itself runs asynchronously in a cloud ML service.
Limitations
- A restricted runtime: no full Node.js API, no direct database access
- Cold starts: the first request to a new isolate costs another 1–5 ms
- Debugging is harder — local emulation of an edge runtime is not always identical to production
- CPU and memory caps: bulk computation does not belong at the edge