Migrate to RunxBuild and earn up to $50 in hosting credit on your first deposit.

Calculate your savings
unxBuild
Back to Blog Explainer

Cloud Edge: Edge Computing, CDN, and 5G MEC

Sean

Platform Writer

Jul 05, 2026
5 min read

Cloud edge runs compute at the network edge - close to users - to reduce latency and bandwidth costs. Examples: CDN edge functions (CloudFront Functions, Cloudflare Workers, Vercel Edge), 5G Multi-access Edge Computing (MEC), IoT gateways. The team that uses edge for latency-sensitive logic (auth, A/B test routing, geo-routing) has the right pattern.

Cloud Edge: Edge Computing, CDN, and 5G MEC

Table of contents

What is edge computing

Edge runs compute close to users:

  • CDN edge nodes: Cloudflare (300+ cities), Fastly, CloudFront.
  • Telco edge: 5G MEC, telco co-location.
  • IoT edge: on-device or local gateway.

The team that uses edge has milliseconds-latency logic.

Edge functions / serverless edge

JavaScript/WASM functions running at CDN edge nodes:

  • Cloudflare Workers: V8 isolates, milliseconds cold start.
  • CloudFront Functions (formerly Lambda@Edge): Node.js or Cloudflare Workers-compatible.
  • Vercel Edge Functions: TypeScript/JS.
  • Deno Deploy: Deno runtime at edge.

The team that uses edge functions has auth/routing/redirect logic at the edge.

Common edge use cases

  • A/B testing: route users to variants based on cookies/headers.
  • Auth tokens: validate JWTs at the edge, no backend roundtrip.
  • Geo-routing: redirect to country-specific content.
  • Bot detection: challenge suspicious requests before they hit the origin.
  • Personalization: inject user-specific content into cached HTML.
  • CDN cache key customization: cache per-user or per-variant.

The team that uses these patterns has lower latency for end users.

Limitations of edge

  • Limited runtime (usually JS/WASM, no native binaries).
  • Limited execution time (usually 5-30 seconds).
  • No access to origin DB.
  • Stateless (no persistent connections).

The team that uses edge for the right workloads (stateless logic) has the right fit.

Cloudflare Workers example

// Cloudflare Worker
export default {
  async fetch(request) {
    const url = new URL(request.url);
    
    // Geo-routing
    const country = request.cf.country;
    if (country === 'GB' && url.pathname === '/') {
      return Response.redirect('https://example.co.uk/', 302);
    }
    
    // Bot challenge
    const userAgent = request.headers.get('user-agent') || '';
    if (/bot|spider|crawl/i.test(userAgent)) {
      return new Response('Blocked', { status: 403 });
    }
    
    return fetch(request);
  }
};

The team that uses Cloudflare Workers has edge logic without managing servers.

5G MEC

Multi-access Edge Computing (MEC) puts compute at the 5G base station:

  • Sub-10ms latency to mobile devices.
  • Used for: AR/VR, autonomous vehicles, real-time gaming, IoT.

The team that uses MEC has ultra-low-latency apps. AWS Wavelength, Azure Edge Zones, Google Distributed Cloud offer MEC.

FAQ

What’s the difference between edge and CDN?

CDN: caches content close to users. Edge: runs compute close to users. Modern CDNs include both (cached + executable). The team that uses edge has computation, not just caching.

Is edge computing the same as CDN?

No - CDN is content caching. Edge is general-purpose compute. Most modern CDNs (Cloudflare, CloudFront) provide both.

When to use edge vs region?

Edge: low-latency stateless logic (auth, routing, redirects). Region: stateful logic, DB access, heavy compute. The team that picks by use case has the right split.

How much do edge functions cost?

Cloudflare Workers: $5/month + $0.30/M requests. CloudFront Functions: $0.20/M requests. Vercel Edge: $0.65/M requests. The team that compares has per-M pricing.

Can edge functions access a database?

Yes via HTTP (e.g., to a regional DB or API). No direct TCP. The team that uses edge + regional API has the right architecture.

If you are sizing the infrastructure for the kind of project this post covers, the RunxBuild hosting calculator is the right place to model the line items. The compute, the memory, the storage, the bandwidth, the database - each one is a separate number, and the team’s mental model for the platform is the sum of those numbers. The RunxBuild dashboard is where the team sees the actual usage in one place.

Useful related references:

#edge#cdn#cloudflare#lambda-edge#dev-infra