Edge computing
Edge computing is a distributed computing model that processes data physically close to where it is generated or consumed, on servers positioned near the user or the device, instead of routing every request back to a centralized data centre.
What is edge computing?
By moving processing to servers near the source of the data, edge computing shortens the physical distance a request has to travel. That cuts latency, reduces the bandwidth sent back to a central data centre and keeps applications responsive even when a user is far from the origin server. Edge nodes are often the same points of presence used by a CDN, but instead of only caching content, they can also run code.
How edge computing works
An edge network is made up of many small compute nodes spread across geographic regions. When a request comes in, it is routed to the nearest node instead of the origin server. That node can serve cached content, run a lightweight function, or process data (from a sensor, a form submission, an API call) before optionally forwarding a summarized result to a central system. A typical edge function looks like this:
export default async function handler(request) {
const country = request.headers.get('cf-ipcountry');
return new Response(`Hello from ${country}`);
}Types of edge deployments
- Edge functions: small pieces of serverless code run at CDN points of presence, such as Cloudflare Workers or Vercel Edge Functions.
- Edge caching: static and dynamic content cached at edge nodes, close to standard CDN caching.
- IoT edge: processing happening directly on or near physical devices (sensors, cameras, gateways) before sending data upstream.
- Edge databases: data replicated or partitioned across regions to keep reads and writes local.
Edge computing vs. cloud computing
| Aspect | Edge computing | Cloud computing |
|---|---|---|
| Location | Near the user or device | Centralized data centres |
| Latency | Very low | Higher, depends on distance |
| Best for | Real-time, latency-sensitive tasks | Heavy processing, storage, batch jobs |
| Example provider | Cloudflare Workers, Vercel Edge | AWS, Google Cloud, Azure |
Best practices and use cases
Edge computing suits use cases with strict latency requirements: real-time personalization, request-level A/B testing, bot filtering, on-the-fly image resizing, and IoT telemetry. It does not replace the cloud: heavy computation, large-scale storage and complex database operations still belong on centralized servers. A common pitfall is pushing too much logic to the edge, which increases complexity and can make debugging harder since execution is distributed across many locations. Keep edge functions small, stateless and fast.
Edge computing and performance
By processing requests closer to the user, edge computing directly improves Time to First Byte and, in turn, Largest Contentful Paint, both Core Web Vitals signals tied to page experience and search ranking. It also improves resilience: if the origin server goes down, cached or pre-computed responses at the edge can still serve users.
Edge computing at BeBranded
We use edge functions and edge caching to keep web apps fast worldwide, handling redirects, personalization and API logic close to the visitor rather than at a single origin.