What is Edge Computing?
Edge computing runs compute and storage close to users or devices to cut latency. How it works, CDN vs edge, trade-offs and how to test it.
What is edge computing?
Edge computing means running computation and storage close to where data is produced or used, instead of only in a central data center. For a website, that is code running on servers near your visitors. For IoT, it is a gateway next to the sensors. The goal is lower latency, less data sent over long distances, and the ability to keep working when the link to the cloud is poor.
How it works
AWS groups edge setups into two directions. In the upstream direction, edge systems near devices filter or process sensor data locally and send only what matters to a central site. In the downstream direction, content and logic move closer to users, through caching on edge servers, cloud edge services or mobile edge computing over 5G.
A content delivery network (CDN) is the best-known downstream example: it caches content at locations near users. Many providers now also let you run code at those locations, in the same spirit as a serverless function, so a request can be handled, rewritten or personalised without a trip to the origin.
Example
A shop serves product pages through a CDN. Product images and static files are cached at the edge. A small edge function reads the visitor's country, picks the right currency and redirects or rewrites the request. Only cache misses and checkout calls reach the origin servers. Visitors far from the origin see a faster first response, and the origin handles less traffic.
Benefits
- Lower latency: shorter distance means a faster response for time-sensitive work.
- Less bandwidth: only filtered or cache-missing data travels to the central site.
- Resilience: local processing can continue through connectivity disruptions.
- Data rules: processing near the source can help meet data sovereignty requirements such as GDPR.
Common mistakes and trade-offs
- Moving everything to the edge. Heavy or stateful work often belongs in a central region, close to the database.
- Ignoring runtime limits. Edge runtimes usually cap CPU time and memory per request, so check your provider's documented limits before porting code.
- Forgetting that data is far away. An edge function that calls a distant database on every request can be slower than serving from the origin.
- Not testing cache behaviour. A low hit rate sends the traffic to the origin anyway.
- Debugging only from your own location. Behaviour differs by region.
Edge computing in testing and monitoring
Edge performance depends on where the user is, so measure from several places. LoadFocus page speed monitoring runs scheduled Lighthouse audits from 25 cloud regions, which shows how a page behaves for visitors in different parts of the world. Remember that cache misses still reach your origin, so size and load test it for that traffic too. For practical speed work, see our guide to improving your website speed in 10 steps.
FAQ
Is edge computing the same as a CDN?
No. A CDN is one form of edge computing, focused on caching and delivering content. Edge computing is broader and also covers running application logic or processing data near the source.
How is edge computing different from cloud computing?
Cloud computing runs workloads in a provider's data centers. Edge computing runs them near devices and users. They are used together, and cloud providers offer edge services that extend processing beyond their data centers.
Does edge computing always reduce latency?
Not always. It helps when the work can be done at the edge. If the edge code still waits on a distant database or API, you can lose the gain.
What are typical use cases?
Content caching, request rewriting and personalisation, filtering IoT sensor data, and real-time systems that cannot wait for a round trip to a central cloud.
Related terms
Related LoadFocus Tools
Put this concept into practice with LoadFocus, the same platform that powers everything you just read about.