What is Edge Functions?
Serverless functions that execute at CDN edge locations geographically close to users, providing ultra-low latency for request processing, personalisation, and routing decisions.
Understanding the Details
Edge functions bring compute to where users are. Instead of sending every request to a central server, edge functions run at CDN edge locations worldwide, processing requests in milliseconds. This is ideal for tasks that need to happen before the page loads: authentication checks, geolocation-based redirects, A/B test assignment, feature flags, and request routing. Edge functions have stricter constraints than regular serverless functions — limited runtime duration, smaller memory, and restricted API access — but their latency advantage is significant for user-facing decisions. Vercel Edge Functions, Cloudflare Workers, and Deno Deploy are leading platforms for edge compute.
How It Works in Practice
A/B test routing
Edge functions assign visitors to test variants based on cookies, ensuring consistent experience without client-side flicker.
Geo-based personalisation
Edge functions detect visitor location and redirect to the appropriate regional pricing page or language version.
Authentication at the edge
JWT validation happens at the edge, blocking unauthenticated requests before they reach the origin server.
Why It Matters
In a world where milliseconds matter for user experience and conversion rates, edge functions provide the lowest possible latency for critical request-time decisions.
What People Often Get Wrong
Edge functions replace serverless functions. Actually, they complement them — edge for latency-sensitive tasks, serverless for complex compute.
Edge functions can do anything serverless functions can. Actually, edge functions have constraints on execution time, memory, and available APIs.
Edge computing is only for large-scale applications. Actually, even small sites benefit from edge processing for authentication and personalisation.
How We Handle Edge Functions
We use edge functions for authentication, A/B testing, and personalisation, keeping latency-sensitive decisions as close to users as possible.
Related Terms
Common Questions
Need Help With Edge Functions?
If you'd like to discuss how edge functions applies to your business, we're happy to explain further.