Edge Computing
Running computation at the network edge, close to the user, instead of in a central data center. Reduces latency for real-time applications like IoT and streaming.
What is Edge Computing?
In short
Edge computing runs processing and storage on servers physically close to the user or device, like a city-level data center or a server inside a cell tower, instead of sending every request back to one central cloud region. Because the data travels a much shorter distance, response times drop from hundreds of milliseconds to single-digit milliseconds, which is what real-time work like video, gaming, and IoT needs.
What edge computing actually means
The "edge" is the edge of the network: the point closest to where data is created or consumed. A traditional cloud setup might process all your requests in one region, say AWS us-east-1 in Virginia. If your user is in Mumbai, every request makes a round trip of roughly 12,000 km, which adds 200 ms or more just in network travel before any work happens.
Edge computing moves the work outward. Instead of one big data center, you run smaller compute nodes in hundreds of locations: ISP facilities, telecom towers, retail stores, factory floors, or content delivery network points of presence. The request is handled by the nearest node, so the round trip might be 50 km instead of 12,000 km.
It sits on a spectrum. A CDN edge cache that only serves static files is the lightest form. Running actual application logic, like authentication or image resizing at the edge, is heavier. Putting a full server rack in a factory to process sensor data on-site is the heaviest, often called on-premise or fog computing.
How it works under the hood
A request first hits DNS or anycast routing, which points the user at the nearest edge location instead of the origin. Anycast is common: the same IP address is announced from many sites, and internet routing naturally sends each user to the closest one.
At the edge node, a lightweight runtime executes your code. Cloudflare Workers and AWS Lambda@Edge use V8 isolates or small containers that cold-start in under 5 ms, far faster than a full virtual machine, because you cannot afford slow startups when you have thousands of small nodes.
State is the hard part. Edge nodes usually keep a cache and a small replicated database for reads, while writes and the source of truth still flow back to a central region. Systems like Cloudflare's D1, Fly.io's read replicas, or DynamoDB Global Tables push data out to the edge so most reads are local and only a fraction need the full trip home.
When to use it and the trade-offs
Reach for edge computing when latency is the product: live video, multiplayer games, AR/VR, autonomous vehicles, payment authorization, and IoT control loops where a 200 ms delay is unacceptable. It also helps with bandwidth, since processing a video feed on-site means you ship a small result instead of the raw stream, and with data residency, since you can keep data inside a country by processing it locally.
The cost is complexity. You now operate hundreds of locations instead of one, so deployment, monitoring, and debugging get harder. Edge runtimes are restricted: limited memory, short execution time, no full file system, and often a subset of language features. You cannot just lift and shift a heavy backend there.
Consistency is the real tax. Data spread across many nodes means you accept eventual consistency for most reads, and you have to decide what must be strongly consistent and route those operations back to the core. Anything stateful and write-heavy is usually a poor fit for the edge.
A concrete example
Picture a global e-commerce site. A shopper in Tokyo loads a product page. The HTML shell, images, and JavaScript are served from a CDN edge node in Tokyo in about 10 ms. An edge function checks their auth cookie and runs an A/B test assignment right there, no trip to Virginia needed.
When they add an item to the cart, that write goes back to the central database because inventory and orders need a single source of truth. But the price display, currency conversion, and personalized recommendations are computed at the edge from replicated data.
The result: the page feels instant everywhere in the world, the origin handles far fewer requests because the edge absorbs the read-heavy traffic, and the central database only sees the small slice of operations that genuinely need it.
Where it is used in production
Cloudflare Workers
Runs JavaScript and WebAssembly in V8 isolates across 300-plus cities, cold-starting in under 5 ms for auth, redirects, and personalization at the edge.
AWS Lambda@Edge and CloudFront Functions
Executes functions at CloudFront edge locations to rewrite requests, do header manipulation, and resize images close to the viewer.
Netflix Open Connect
Places content-serving appliances directly inside ISP networks so video bytes travel the last mile instead of from a distant region.
Fastly Compute@Edge
Runs WebAssembly at the edge with sub-millisecond cold starts for real-time API logic and content assembly.
Frequently asked questions
- What is the difference between edge computing and a CDN?
- A CDN mainly caches and serves static files (images, video, scripts) from nearby locations. Edge computing goes further by running actual application code at those locations, like authentication, request rewriting, or computing a personalized response. Many CDNs, like Cloudflare and Fastly, now offer both.
- Does edge computing replace the cloud?
- No. The edge handles latency-sensitive and read-heavy work close to users, but the central cloud still holds the source of truth, runs heavy batch jobs, and stores the master database. They work together: the edge is the fast front layer, the cloud is the durable core.
- How much latency does edge computing actually save?
- It depends on distance, but a request that travels across continents can take 150 to 300 ms of network round trip. Handling it at a nearby edge node cuts the network portion to single-digit or low-double-digit milliseconds, often a 10x improvement on the network part of the latency.
- What can't you do at the edge?
- Heavy, stateful, write-intensive work is a poor fit. Edge runtimes limit memory and execution time, often lack a full file system, and offer only eventual consistency for replicated data. Operations that need a single authoritative write, like placing an order, still go back to the central region.
- Is edge computing the same as IoT?
- Not exactly. IoT is the source of much edge data: sensors and devices generating readings. Edge computing is the technique of processing that data near where it is created instead of shipping all of it to the cloud. IoT often uses edge computing, but edge computing also powers web, gaming, and video that have nothing to do with IoT.
Learn Edge Computing hands-on
This page explains the idea. The full lesson lets you step through the ring as servers join and leave, read the implementation, and check yourself with a quiz. It is one of 760+ lessons in the System Design Masterclass, from your first API call to distributed consensus. Eleven Foundation lessons are free, no signup. Lifetime access is ₹499 in India or $7.99 worldwide, one payment, no subscription.
Related lessons
Lessons that touch on Edge Computing as part of a larger topic.
See also
Related glossary terms you might want to look up next.
CDN
A network of servers distributed globally that caches content close to users. Netflix uses CDNs to stream video from servers near you, not from one central location.
Serverless
A cloud execution model where the provider manages all infrastructure and you pay only for actual compute time. AWS Lambda, Vercel Functions, and Cloudflare Workers are serverless.
Latency
The time delay between sending a request and getting a response. Amazon found every 100ms of extra latency costs 1% in sales.
Content Delivery
The process of distributing and serving content to users from locations geographically close to them for faster load times.
HTTP Caching
Browser and proxy caching controlled by HTTP headers like Cache-Control, ETag, and Last-Modified. Eliminates redundant network requests for unchanged resources.
Static Site Generation (SSG)
Pre-rendering pages to static HTML at build time. The fastest possible page loads because there's no server-side computation on each request.