Lesson 1 of 9 · 22m
What the Edge Actually Is — and What It Is Not
Build the correct mental model for edge execution: many small points of presence, shallow local state, and network physics that never negotiate.
The worst edge architecture I ever reviewed began with a sentence that sounded reasonable in a meeting: “we’ll just run everything closer to users.” Six months later the team had thirty copies of a control plane, no consistent place to put writes, and a failover ritual involving a spreadsheet. The edge is not your data center copied into more places. It is a different execution bargain.
The bargain: locality in exchange for constraint
An edge network puts compute in many points of presence near users. The request enters the closest healthy location, executes small amounts of logic, and either completes locally or continues to an origin. The win is not magical speed. It is fewer network miles before policy, caching, and cheap computation can happen.
user in São Paulo
|
v
nearest edge PoP ---- cache hit? ----> response in ~20 ms
|
miss or dynamic write
v
regional/core origin in us-east-1 ----> response often 150+ msYou trade away conveniences: long-running processes, local durable disks, unrestricted outbound networking, and often access to arbitrary npm or system packages. Designs that ignore that bargain fail loudly.
Edge is a layer, not a location
In production systems, “edge” usually contains several layers:
DNS/Anycast routing where the user lands
TLS termination modern crypto close to the client
request compute small synchronous decision logic
cache reusable responses close to users
origin services durable writes, heavyweight computeA mature design decides which layer owns each responsibility. Authentication validation might be edge-local. Shopping-cart mutation usually is not. HTML assembly can be either, depending on personalization and cacheability.
Physics still runs the meeting
The speed of light in fiber is roughly two-thirds its vacuum speed, and real networks add routing, queuing, TLS, and application time. You cannot make a transatlantic database round trip cheap by moving only the web server. If a request needs three sequential calls back to a central database, the user still pays intercontinental latency three times.
edge auth check +1 local round trip
central database user lookup +1 WAN round trip
central inventory write +1 WAN round trip
central event write +1 WAN round tripThe correct response is not “add more edge locations.” It is reduce dependent round trips, cache reads, precompute decisions, or move the authoritative state closer to where it is used.
What to put at the edge first
Good first candidates are request validation, redirects, A/B assignment, header normalization, bot filtering, JWT verification, cache-key shaping, response assembly, and personalization with bounded input. Poor first candidates are inventory mutation, financial ledger writes, report generation, batch processing, and workflows that require strongly serialized global state.
Field notes
- “Serverless” does not mean stateless by architecture; it only means you do not manage the host. State still has to live somewhere.
- Measure end-to-end latency, not distance to the first PoP. A fast hello and a slow database call still produce a slow request.
- Edge platforms differ sharply in execution limits, startup behavior, and consistency guarantees. Read the platform contract before drawing boxes.
- Every edge decision should answer: what work is removed from the origin path, and how many WAN round trips disappear?
Was this lesson helpful?