Problem
Requests that travel to a distant origin pay round-trip latency and load central infrastructure. Some workloads, such as personalization checks or device data filtering, need decisions within milliseconds.
Also known as: edge-functions, compute-at-the-edge
Run computation and caching close to users or devices to cut latency and offload origin systems.
Requests that travel to a distant origin pay round-trip latency and load central infrastructure. Some workloads, such as personalization checks or device data filtering, need decisions within milliseconds.
Edge computing moves work from a central region to points of presence near users. Common uses range from CDN caching to running small functions on every request and, in IoT, processing sensor data near the device.
Edge platforms differ in runtime model. Some run lightweight isolates with strict CPU limits and no filesystem. Others run containers near cell towers or on-premises gateways. Check limits on execution time, memory, outbound connections, and available storage before designing around them.
The edge handles what it can and forwards the rest.
client -> edge node
1 verify JWT signature (no origin call)
2 cache lookup (key: path + variant)
3 hit -> respond
miss -> origin -> store with TTL 60s, stale-while-revalidate
4 origin down -> serve stale
For data, favor read-mostly patterns. Replicated key-value stores at the edge are eventually consistent, so use them for configuration, feature flags, and catalogs, and send writes to the origin. Use request collapsing so that simultaneous misses result in a single origin fetch.
Medium - per-request edge pricing
Medium
Medium
Stale cached content served after an update
Edge logic bug deployed globally within seconds
Origin overload when cache misses stampede