Moving a site to edge runtime in 2026: cost and benefit across 4 projects
We migrated four production sites to edge runtime. Where TTFB fell 60%, where the hosting bill doubled, and which 5 Node patterns just do not survive outside Lambda.
Creastra Digest
- Edge cuts 40–60% TTFB for geo-spread audiences; 5–10% if you serve one country
- Banned Node APIs: fs, child_process, native modules — rewrite or keep on Node
- Cost: at 1M req/day, edge runs 18–35% pricier than Node
Edge runtime is fashionable but ambiguous. In Q1 2026 we migrated four production sites: a landing with traffic from 18 countries, a B2B catalogue serving Moscow only, a Telegram Mini App, and our own studio site. Results were uneven — sometimes an obvious win, sometimes a doubled bill with no visible upside. Honest write-up follows.
When edge earns its keep
- Geo-spread audiences (3+ time zones) — TTFB drops from 380 ms to 120 ms
- Very thin API endpoints (geolocation, A/B branching, redirects)
- Middleware for auth and URL rewrites
- Dynamic personalisation on the edge without round-tripping to origin
- Workloads where Node cold starts hurt (low traffic, frequent SSR)
When edge is wasted
If 92% of your traffic comes from Russia and your origin lives in Moscow, the gap between edge and Moscow Node is 14 ms. UX impact: zero. Cost impact: +30%. We rolled one client's B2B catalogue back exactly for this reason — «bought speed, paid in cash, no one noticed».
What breaks on migration
- fs.readFileSync — gone; everything must be in memory or on CDN
- Postgres clients over TCP do not work — use an HTTP serverless proxy (Neon, Supabase pooler)
- Heavy npm packages with native binaries do not run
- No /tmp file scratch space
- Buffer is limited; prefer Uint8Array
- Bundle size capped at 1–4 MB depending on the provider
// Postgres on edge via Neon HTTP — the only viable path
import { neon } from '@neondatabase/serverless';
export const runtime = 'edge';
const sql = neon(process.env.DATABASE_URL!);
export async function GET(req: Request) {
const country = req.headers.get('x-vercel-ip-country') ?? 'RU';
const rows = await sql`
SELECT id, title FROM products
WHERE available_in @> ARRAY[${country}]
LIMIT 24
`;
return Response.json({ rows });
}Price tag in numbers
On the Par Khorosh franchise landing (Russia + CIS, 320,000 MAU) the Vercel bill grew from 78 to 142 USD/month. TTFB dropped from 290 to 110 ms, conversion +2.4%. One franchise deal paid it back. On the Brand-Hall catalogue (Moscow only, 1.1M req/day) edge ran 35% pricier with no UX gain — we rolled back to Node serverless.
Hybrid is almost always the right answer
You do not need to migrate everything. On our studio site, middleware and A/B routing run on edge, pages render on Node serverless, heavy analytics live in a separate background job. We get the upside where it is real and avoid the bill where it is not.
Pre-migration checklist
- 30-day traffic map by region
- Dependency list flagged «edge-safe / not safe»
- DB client verified on edge, or a plan to swap in an HTTP proxy
- Future bill modelled against the provider's pricing
- A 30-minute rollback plan — if there's no win, do not get heroic