netlify/netlify-edge-functions
FreeLow-latency edge middleware and geolocation logic
FreeFree tier
About netlify/netlify-edge-functions
Netlify Edge Functions allow developers to run serverless functions at the network edge, enabling low-latency middleware, geolocation-based logic, and dynamic request/response modification. Integrated directly with Netlify's platform, they support A/B testing, personalization, redirects, and authentication without managing infrastructure.
Key Features
Edge computing with global network distribution
Geolocation-based request handling
Custom middleware for modifying requests and responses
Seamless integration with Netlify deploy and hosting
Pros & Cons
Pros
- Very low latency due to edge execution
- No cold starts (runs on persistent workers)
- Simple deployment alongside Netlify sites
- Built-in geolocation data available
Cons
- Limited to Netlify platform (vendor lock-in)
- Execution time and memory constraints
- Not suitable for heavy computation or stateful workloads
Best For
Geo-targeted content deliveryA/B testing at the edgeAuthentication and authorization checksURL redirects and rewrites
FAQ
What are Netlify Edge Functions used for?
They are used for low-latency middleware, geolocation logic, A/B testing, authentication, and dynamic response modifications at the edge.
How do they differ from Netlify Functions?
Edge Functions run at the CDN edge with lower latency, while Netlify Functions run in regional datacenters and have longer cold starts.