Edge computing in 2026: running code 50 ms away from your visitor
Edge computing means executing application code on the same CDN network as your static files — typically 200-300 points of presence (PoP) spread across 6 continents. For a visitor in Dakar, the code runs in Casablanca, Paris or Marseille (depending on provider), not in the US-East-1 Virginia datacenter.
Measured results on our 2025-2026 Kolonell deployments:
- Median TTFB: 30-60 ms (vs 200-400 ms single-region serverless)
- Cold start: <5 ms (vs 200-1,500 ms classic AWS Lambda)
- p99 latency: <150 ms from Senegal
This became non-negotiable for premium sites in 2026.
Edge vs classic serverless: the difference
| Aspect | Classic serverless (Lambda) | Edge computing |
|---|---|---|
| Location | 1 chosen AWS region | 200-300 global PoP |
| Cold start | 200-1,500 ms (Node) | <5 ms (V8 isolate) |
| Runtime | Node, Python, Go, etc. | V8 isolate (JS/WASM) |
| RAM | 128 MB - 10 GB | 128 MB typical |
| Max duration | 15 min | 30 s typical (varies) |
| Cost per invocation | Higher | Lower |
| Ideal case | Heavy, long workloads | Auth, perso, headers, A/B, light AI |
Edge is not "better" than classic serverless — they are two different tools. Edge shines for short, frequent, latency-critical functions. Classic serverless shines for CPU/RAM-heavy workloads (PDF generation, video processing, batch).
The 4 major providers in 2026
Vercel Edge Functions
- Runtime: V8 isolate (Web Standard APIs compatible)
- Network: 300+ PoP (aliased to Cloudflare underneath)
- Pricing: included in Pro plan (20 USD/user/mo) up to 1M invocations/month, then 2 USD/M
- Integration: native Next.js Middleware + Route Handlers
export const runtime = 'edge' - Best for: Next.js sites on Vercel — default pick
Cloudflare Workers
- Runtime: V8 isolate
- Network: 330+ PoP, the widest on the market (Casablanca, Lagos, Johannesburg in Africa)
- Pricing: 5 USD/mo for 10M included requests, 0.30 USD/M after
- Integration: standalone, or via Pages, or via OpenNext (Next.js → Workers)
- Best for: non-Vercel projects, cost-constrained high volume, Africa latency
Netlify Edge Functions
- Runtime: Deno (Web Standard APIs too)
- Network: Deno Deploy, 35+ regions
- Pricing: 1M invocations/mo free on Pro (19 USD/mo), 2 USD/M after
- Integration: native on Netlify
- Best for: Netlify sites (Astro, Hugo, Next.js)
AWS Lambda@Edge
- Runtime: Node.js / Python (not V8 isolate)
- Network: 400+ CloudFront edges
- Pricing: 0.60 USD/M requests + duration
- Integration: CloudFront + Lambda@Edge (complex)
- Best for: existing AWS workloads, VPC integration
Edge use cases in 2026
1. Fast authentication
Verify a JWT cookie at the edge, redirect to /login or let through. Added latency: 5-10 ms (vs 100-300 ms region serverless).
2. Geo personalization
Read request.geo.country or request.cf.country at edge, serve FR/EN/AR variant without server round-trip.
3. A/B testing
Hash IP or cookie to assign variant at edge, return the right HTML. No flash of untested content (FOOC).
4. Light AI inference
Workers AI (Cloudflare) or Vercel AI SDK in edge runtime to call GPT-5 mini / Claude 4.5 Haiku with token-by-token streaming. First-token TTFB: 200-400 ms.
5. Rate limiting and bot protection
Count requests per IP at edge (with KV or Durable Objects), block scrapers before they hit origin.
6. Image transformation
Need a professional website?
Kolonell builds websites that attract clients, optimized for the Sénégalese market. Free quote in 2 minutes.
Cloudflare Images or Vercel Image Optimization: resize, AVIF/WebP format, quality — all 50 ms from the visitor.
7. Header injection / rewrite
Inject CSP, HSTS, security headers; or rewrite /products/123 to /products/{slug} at edge.
8. Feature flags
Read LaunchDarkly / Statsig / Vercel Edge Config at edge, toggle features per segment.
Decision table: which edge for what
| Profile | Recommendation |
|---|---|
| Next.js + Vercel site | Vercel Edge Functions (default) |
| Next.js but tight budget | Cloudflare Workers via OpenNext |
| Africa latency critical | Cloudflare Workers (Casablanca, Lagos PoP) |
| Astro/Hugo + Netlify site | Netlify Edge Functions |
| Existing AWS workload | Lambda@Edge |
| Edge AI inference (LLM) | Cloudflare Workers AI or Vercel AI SDK edge |
| Strict EU sovereignty | Cloudflare Workers (configurable EU-only) |
Observed performance at Kolonell
On showcase demos site-clinique, site-hotel, site-restaurant (Next.js + Vercel Edge):
| Metric | Without edge (Serverless Paris) | With edge (Vercel Edge) |
|---|---|---|
| Dakar TTFB | 280 ms | 65 ms |
| Paris TTFB | 80 ms | 28 ms |
| New York TTFB | 320 ms | 45 ms |
| Cold start | 800 ms | 4 ms |
| Lighthouse Perf | 78 | 96 |
User-perceived gain: "instant" pages even on Senegalese 4G.
Real cost for an SME
For an SME site with 100k pageviews/month and 30 % edge requests:
- Vercel Pro + Edge: 20 USD/mo (1 user) — 100k invocations in plan
- Cloudflare Workers (standalone): 5 USD/mo, ~3M invocations included
- Netlify Pro + Edge: 19 USD/mo
For a 5M pageviews/mo site: 80-200 USD/mo on edge depending on provider. Marginal vs the conversion gain from speed.
FAQ
Does edge replace classic serverless?
No — they are complementary. Edge for short latency-critical functions (auth, perso, headers). Region serverless for heavy workloads (PDF gen, video, batch AI). On a modern site, you typically have 70 % edge / 30 % region serverless.
Cloudflare Workers or Vercel Edge for Next.js?
If the site is on Vercel and costs fit: Vercel Edge Functions (native integration, flawless DX). If the site is large (5M+ requests/mo) and you want to control cost: Cloudflare Workers via OpenNext (open-next.js.org). For Africa latency: Cloudflare has more local PoP.
Does edge work with a database?
Yes, but you need an edge-compatible DB: Neon Postgres (HTTP), PlanetScale (HTTP), Turso (libSQL), Cloudflare D1, Upstash Redis. A traditional Postgres TCP connection does not work from edge (no pool).
How much does AI inference at the edge cost?
Workers AI (Cloudflare): 0.011 USD / 1k Llama 3.1 8B requests. Vercel AI SDK edge with OpenAI/Anthropic: standard OpenAI/Anthropic billing (~0.15-0.80 USD / Mtok). Edge advantage = token-by-token streaming with TTFB <300 ms.
Important limits to know?
No native Node modules (fs, legacy crypto.createHash), 1 MB Workers function size (50 MB Vercel), 30 s typical max duration, limited RAM (128 MB). For 90 % of web use cases that is plenty.
Let us talk edge for your site
If you want to speed up an existing site or launch a new one with edge runtime (Vercel + Cloudflare), we can audit current perf and quote migration in 48 h. WhatsApp +221 77 596 93 33.
Mohamed Bah
Fondateur, Kolonell
Passionate about digital and entrepreneurship in Africa, Mohamed has been helping Sénégalese businesses with their digital transformation since 2020. Founder of Kolonell, he believes every SME deserves a professional and accessible online présence.
