Beyond Static Caching
Edge nodes used to only cache files. Edge compute lets you run small programs, often called workers, on those same nodes. Logic executes near the user, so responses avoid a round trip to a distant origin.
What Workers Do Well
- Rewriting requests and responses, such as adding headers or routing
- Personalization like geolocation, A B testing, or feature flags
- Authentication checks before a request ever reaches origin
- Assembling responses from multiple cached fragments
Constraints
Workers run in lightweight isolates, not full containers, so they start in milliseconds but face limits.
- Short execution time budgets per request
- Limited memory and no long lived local state
- No heavy dependencies since the runtime is sandboxed
State usually lives in an edge key value store or is passed to origin.
Key idea
Edge compute runs lightweight workers on CDN nodes so request rewriting, auth, and personalization happen near the user, trading rich runtimes for millisecond startup and tight resource limits.