Edge runtime
A lightweight Next.js runtime based on V8 isolates and standard Web APIs, which starts almost instantly but cannot use most Node.js APIs.
In more detail
It supports fetch, Web Crypto, streams and similar Web APIs, but not fs, native addons or raw TCP sockets, and it limits code size. It suits middleware, redirects and small streaming or personalisation handlers.
Related terms
- Node.js runtime — The default Next.js runtime, where server code runs on Node.js with access to every Node API and npm package.
- V8 isolate — A separate instance of the V8 engine with its own heap and garbage collector; objects in one isolate cannot be seen from another.
- Web APIs — The standard interfaces defined for the web, such as fetch, Request, Response, URL, streams and Web Crypto.
- edge network — Servers placed in many locations close to users, which can serve cached content or run small pieces of code with low latency.
Taught in
- Server Components: Async Execution & Constraints — Next.js 15 & Modern App Router Architecture
- Server Actions: use server Directives & Mutations — Next.js 15 & Modern App Router Architecture
- Edge Middleware: Auth Verification & Route Matchers — Next.js 15 & Modern App Router Architecture
- Runtime Environments: Node.js vs Edge Runtime Choice — Next.js 15 & Modern App Router Architecture
- Metadata API: Dynamic OpenGraph & Head Management — Next.js 15 & Modern App Router Architecture
- Instrumentation: OpenTelemetry & Performance Spans — Next.js 15 & Modern App Router Architecture