Running code and serving content at the edge—faster responses and global distribution.
Running code and serving content at the edge—faster responses and global distribution.
The edge is infrastructure close to the user (CDN points of presence, edge runtimes like Vercel Edge, Cloudflare Workers). Instead of every request going to a single origin server, static assets (and sometimes dynamic responses) are served from the edge. That reduces latency (round trip is shorter) and load on the origin.
Edge rendering means running your rendering logic (e.g. React components, simple APIs) at the edge. The code runs in a lightweight runtime in many regions; the user hits the nearest one. Good for personalized but not heavily stateful responses (e.g. A/B test variant, geo-based content).

A CDN caches static files (JS, CSS, images) and optionally cacheable API responses (e.g. public GET with Cache-Control). The first request may hit the origin; subsequent requests (from any user near that edge node) get the cached response. So static assets and public data can be served globally with low latency without running your backend everywhere.
For full stack: put your built frontend assets on a CDN (or use a host that does this automatically). For APIs, cache only when the response is public and cacheable; otherwise the gateway or origin must run for each request.

Edge runtimes have limits: no long-running processes, limited CPU/memory, and often no direct DB connection (you call an API instead). Use the edge for: redirects, A/B headers, simple personalization, and caching. Use the origin (your main backend) for: auth that needs a secret store, DB-heavy logic, and anything that cannot run in a short, stateless request. Hybrid: edge for static and cacheable, origin for dynamic and secure.
Ready to see how this works in the cloud?
Switch to Career Paths for structured paths (e.g. Developer, DevOps) and provider-specific lessons.
View role-based pathsSign in to track your progress and mark lessons complete.
Questions? Discuss in the community or start a thread below.
Join DiscordSign in to start or join a thread.