Skip to main content

Edge Computing

Updated 3 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/edge-computing

In short

Edge computing runs code and processes data close to where users or devices are, instead of in a distant central data center, to reduce latency.

What is edge computing?

Edge computing moves computation away from a few large, central data centers and toward the edge of the network, closer to the people and devices that produce the data. The edge can be a server in a nearby city, a small data center at a telecom tower, a gateway in a factory, or even the device itself. Because data travels a shorter distance, responses arrive faster and less traffic has to cross the internet.

In web development, edge computing usually means small functions deployed to hundreds of locations worldwide, often on the same network as a CDN. A request from a user in Tokyo is handled in or near Tokyo, where an edge function can check authentication, redirect by country, personalize a cached page, or pick an A/B test variant before the response is sent. Edge runtimes start in milliseconds, but they restrict what code can do, for example by limiting execution time, memory, and some APIs, and the data a function needs may still live in one central region.

Outside the web, edge computing is common in the Internet of Things, where cameras, sensors, and machines produce too much data to send everything to the cloud, so an edge device filters or analyzes it locally and uploads only the results. Factory robots, vehicles, and retail stores rely on it when decisions must be made in milliseconds or must keep working if the internet connection drops. It is like a chain of neighborhood branch offices that handle everyday requests on the spot and send only the difficult cases to headquarters.

Edge computing is often confused with a CDN. A classic CDN caches and serves copies of static files, such as images and scripts, from edge servers, while edge computing runs your own code at those locations to produce responses. It is not the opposite of cloud computing either: most edge platforms are run by cloud providers and work together with central cloud regions that hold the main databases.

Key takeaways

  • Edge computing runs code close to users or devices to reduce latency and bandwidth use.
  • On the web, edge functions run in many locations, often on CDN networks.
  • In IoT, edge devices process data locally and send only results to the cloud.
  • Edge runtimes start fast but limit execution time, memory, and available APIs.
  • A CDN caches content at the edge; edge computing runs custom logic there.

Example

An edge function that redirects by countryjavascript
// Runs in the location closest to each visitor
export default {
  async fetch(request) {
    const url = new URL(request.url);
    // Edge platforms pass the visitor's country in a header (name varies)
    const country = request.headers.get("x-country") ?? "US";

    if (url.pathname === "/" && country === "DE") {
      return Response.redirect(new URL("/de/", url), 302); // answered at the edge
    }
    // Everything else is forwarded to the origin server
    return fetch(request);
  },
};

Readers ask

What is the difference between edge computing and cloud computing?

Cloud computing usually runs workloads in a small number of large, central data center regions. Edge computing runs them in many smaller locations close to users or devices, and the two are typically combined, with the edge handling fast, local work and the cloud holding central data.

What is an edge function?

An edge function is a small piece of server-side code deployed to many locations around the world and run in the one nearest to each request. It is often used for redirects, authentication checks, personalization, and changing headers.

Is edge computing the same as serverless?

Not exactly, but they overlap. Edge functions are usually serverless because you don't manage the servers, but ordinary serverless functions often run in a single cloud region, while edge functions run in many locations at once.

See also

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings