Edge runtime vs Node.js runtime
Edge runtime is a lean Web-API V8 sandbox that starts almost instantly. Node runtime is a full Node process with npm, fs, and sockets.
See it
What it is
The edge runtime (Cloudflare Workers, Vercel Edge, Deno Deploy) runs your code in a V8 isolate built around Web APIs: fetch, Request and Response, Web Crypto, streams. No filesystem, a small bundle budget, a tight CPU limit. The absolutes have softened, though: several platforms now expose a chosen slice of 'node:' built-ins, and some offer socket APIs, so read your provider's compatibility list instead of assuming nothing works. What you get back is near-zero cold starts and code running in many locations at once. The Node.js runtime is a real Node process: nearly all of npm works, including Postgres drivers over TCP, sharp, Puppeteer, and fat dependency trees, with native binaries and platform restrictions as the exceptions. The price is a cold start whenever nothing is warm, and a home region you have to choose, though nothing stops you deploying the same Node app to several of them.
Pick edge for short, network-bound, per-request decisions: auth checks, geo routing, personalization, header rewriting, streaming a model response through from an HTTP API. Pick Node for anything that touches a real database driver, processes images or PDFs, runs longer than a few hundred milliseconds, or depends on a library that pokes at 'process' or the filesystem.
Two things bite people. The build error is usually a transitive dependency you did not know was Node-only, surfacing as a missing 'fs' or 'crypto' module. The subtler one: edge is only fast if the data is nearby. An edge function in Singapore querying a database in Virginia loses to the boring Node function sitting next to that database.
Ask AI for it
Audit these route handlers and assign a runtime to each. Mark short, network-only routes (auth checks, geo redirects, header rewrites, streaming proxies to an HTTP API) as edge by exporting runtime = 'edge' from the route file, and keep anything using a TCP database driver, 'fs', sharp, or a Node-only dependency on the Node.js runtime. For each route you move to edge, swap Node built-ins for Web APIs (fetch, Web Crypto, ReadableStream) and list every dependency that blocks the move, with the reason.