Cloud & Infra
Edge Is Not a Region
Moving the compute without moving the data is how a latency project makes the product slower. The rule for the next diagram.
Edge compute is sold as "closer to the user". That is true and almost beside the point. The property that actually changes your architecture is that edge runtimes are short-lived, stateless and everywhere, which makes them excellent at some jobs and structurally wrong for others.
What the edge is good at
- Static and cached responses — the closer the byte, the smaller the round trip.
- Redirects, rewrites and header logic — cheap decisions that do not need a database.
- Auth token verification — a signature check with a public key is pure CPU.
- Personalisation with a cache — rewrite a cached page per user or per region.
- Image and HTML transforms — CPU work with no state to lose.
What the edge is bad at
Anything that needs a transaction. If two requests must agree about a counter, an inventory level or a session, you need one place where the writes are ordered, and "one place" is the opposite of "everywhere".
The pattern that fails is the one everybody tries first: put the app on the edge and keep the database in one region. Every dynamic request now pays a cross-continent round trip to the database — slower than if the app had been next to the data. Moving the compute without moving the data can make the product slower.
Data has gravity
Latency budgets are dominated by the furthest hop. A 20ms edge response that waits 180ms for a query in another region is a 200ms response with a nice location. Either move the data (replicas, regional tables, per-tenant sharding) or move the compute back next to it.
bytes on the wire: small
edge -> user: ~10-40 ms
edge -> primary DB: ~80-200 ms <-- this is the page
Conclusion: the edge helped the asset, not the app.A rule for the next architecture diagram
- Requests with no shared state → edge.
- Requests that read a replicated dataset → nearest replica, with a stated staleness budget.
- Requests that write → region of the primary, and say so in the UI if it matters.
- Scheduled work → a region. Cron on the edge is a patient way to discover duplicate execution.