loading
loading
Code that runs in a data center physically close to the user, not in one central region.
Edge functions deploy to a global network of locations (Cloudflare Workers, Vercel Edge) so a user in Tokyo hits a Tokyo node instead of round-tripping to Virginia, cutting network latency to single-digit milliseconds. They run on lightweight runtimes with fast cold starts but tight limits: short execution time, small memory, no native binaries. Great for auth checks, routing, streaming proxies to an LLM, and caching; wrong for heavy compute. Think of them as a smart, programmable layer between your user and your origin.
Plainly
Think of Edge Function as roads and power for the app city. Code that runs in a data center physically close to the user, not in one central region.
In practice
Use it when local behavior needs to become a reachable, reliable deployed service. In practice, define the owner, input, output, and failure mode before you rely on it.