# Edge Computing

> The Edge Computing is an approach of running code on servers located geographically close to users.

## What is edge computing in web development?

The approach where code runs on a distributed network of servers near the user instead of a single data center. Reduces latency for SSR, redirects, authentication and personalization.

- Topic: Web Application
- Type: concept

## Common mistakes

- Moving rendering to the edge while every request still waits for a database in one region.

## Key points

- Code for the edge does not use runtime APIs that are missing there, like the file system.
- Edge functions do not make many round trips to a database far away, which removes the latency gain.
- Secrets come from environment settings, not hardcoded in the function.

## Interview questions

### Edge functions vs serverless functions: what is the difference?

Edge functions run in many locations close to users, often on a lighter runtime, while regular serverless functions run in one region with a full server runtime.

### When is edge computing not worth it?

When each request needs data from a single-region database, because the round trips to it cancel out the shorter distance to the user.

### What runs well at the edge?

Redirects, auth checks, A/B routing, header changes, personalization from cookies and serving cached or cheaply rendered pages.

## Related cards

- [CDN](https://wonderium.dev/web/cdn.md)
- [SSR](https://wonderium.dev/web/ssr.md)
- [TTFB](https://wonderium.dev/web/ttfb.md)
- [Hosting](https://wonderium.dev/web/hosting.md)
- [Streaming SSR](https://wonderium.dev/web/streaming-ssr.md)

---

- Level: [Web Platform](https://wonderium.dev/web.md)
- HTML version: https://wonderium.dev/web/edge-computing
- Last updated: 2026-11-25
