Edge computing runs code at CDN edge locations:
Use cases:
- A/B testing (route users without origin roundtrip)
- Authentication (validate tokens at edge)
- Personalization (customize content per user)
- API gateway functions (rate limiting, transforms)
Platforms:
- Cloudflare Workers
- AWS Lambda@Edge
- Fastly Compute@Edge
Constraints:
- Limited execution time
- Restricted APIs
- Cold start latency
- Debugging is harder
Move logic to edge when latency matters and logic is simple.