Course map

Topic 218 / Specialist

Edge computing

Chapter 13.10 · Edge Computing

What and why

A CDN (→ 89) moves static content closer to users by caching it at edge locations; edge computing moves actual compute — not just cached bytes — to those same edge locations, or to on-premise edge hardware close to where data is generated, because some workloads need lower latency or lower bandwidth use than sending every request back to a distant core data center allows. Builds on: → 89 (content delivery networks: push vs. pull, edge caching).

Diagram

User ──► nearest edge location (cache + compute) ──hit──► respond directly
                       │
                     miss / needs core
                       ▼
                 core data center

On-prem edge node (factory floor) ──process/filter locally──► summary ──► core (async)

How it works

  1. Latency-driven placement: a function running at the edge location nearest the user avoids the round trip to a distant core region, which matters for workloads sensitive to that round trip — real-time interaction, a personalization decision needed before a page renders.
  2. Bandwidth-driven placement: an on-premise edge node near where data is generated (a factory, a store, a vehicle) can process or filter high-volume data locally and send only a reduced summary to the core, instead of shipping all raw data over a limited or costly link.
  3. Edge-function constraints: edge compute environments are typically short-lived, stateless, and resource-limited compared to a core data center — no large persistent storage, a restricted runtime, tight execution-time limits — because edge locations are numerous and must stay lightweight to deploy everywhere cheaply.
  4. State synchronization: when an edge function needs state beyond what fits its constraints — session data, a cache that must stay consistent with core — that state is synchronized back to and from the core asynchronously; the edge optimizes the common case locally and defers anything needing stronger consistency to the core.
  5. On-prem edge nodes handling intermittent core connectivity must buffer and forward once connectivity returns — the same intermittent-connectivity pattern IoT architecture (→ 217) handles for a single device, here applied to a whole local site.

Practical example

(illustrative). A personalization decision answered by a function at the user's nearest edge location in a few milliseconds of local compute, versus round-tripping to a single distant core region, which could add well over a hundred milliseconds for a far-away user. The edge function answers the latency-sensitive part locally, then asynchronously reports the decision back to core for analytics, without that reporting blocking the user's response.

When to use it

  • Use when: latency to a distant core region is the dominant cost for a specific, small piece of logic, or local data volume at the edge is too large or expensive to ship to core unfiltered.
  • Avoid when: the workload needs strong consistency, large persistent state, or heavy compute that edge environments can't offer — keep that logic at core and push to the edge only the parts proven stateless and tightly bounded.
  • Failure scenarios: an edge function silently depending on state that isn't actually available at the edge (assuming a cache is fresher than it is); an on-prem edge site losing connectivity and buffering data without a bound, eventually dropping data once local storage fills; deploying logic changes to thousands of edge locations without the staged-rollout discipline a fleet firmware update needs (→ 217).
  • Simpler alternative: serve everything from core with a CDN (→ 89) caching static content, adding edge compute only for the specific function proven to need it.

Practice

(Process kind — design exercise; 20–30 min, no lab services). Pick one feature from a system you know (a login flow, feed ranking, a personalization step) and decide whether it would benefit from edge placement, justifying it against the latency, bandwidth, and state-constraint criteria above. Name what state, if any, it would need synchronized back to core. Done when your justification names a specific constraint that would break if you tried to run the whole feature at the edge instead of just the part you chose.

Key takeaway

Edge computing pushes stateless, latency- or bandwidth-bound logic closer to users or data sources, deferring anything needing stronger state or consistency back to core. Done when you can: justify an edge-placement decision against its specific state constraint. Used next in: nowhere else in this book — a specialization for workloads proven latency- or bandwidth-bound at the edge.

References

None — this topic makes no external claims.

Source directory

Search the guide