Skip to content
Glossary · Hosting and delivery

CDN (content delivery network)

Also called content delivery network.

Definition

A network of servers around the world that keeps copies of your files close to users, so pages and media load faster.

Last updated

What it is.

When a user requests an image, script or page, the CDN serves it from the nearest edge location. If the edge does not have it, it fetches it once from your origin server and caches it for the next user. Rules set how long each file is cached.

Most CDNs also protect the origin from traffic spikes and attacks, terminate HTTPS and can run small pieces of code at the edge, called an edge function.

Why it matters

Distance adds delay to every request. A CDN cuts load times for users far from your servers, lowers load on the origin and often reduces egress costs, since many requests never reach your cloud. For media-heavy products it is a large part of the hosting bill.

In a product build

We give static files hashed names so they can be cached for a long time, set short or no caching on personalised responses, and keep user data out of cache keys. Large uploads go to object storage with the CDN in front.

Watch out

Common mistakes.

  1. 01

    Caching personalised pages, so one user sees another's data.

  2. 02

    No way to purge, so a bad file stays live for hours.

  3. 03

    Forgetting to compress and resize images, which keeps the bandwidth bill high.

Related

Related terms.

Building something with this? Ask an engineer.

OceanLab designs and builds production software. Tell us what you are planning and we will reply with how we would approach it.

OceanLab

Enterprise Software Engineering - Human + AI

Languages

Locations

Global Headquarters

21 Merchant Road, 3rd Floor, Singapore 058267

Main corporate office and leadership operations

North America Office

548 Market Street, PMB 12472, San Francisco, CA 94104

Client operations and business development

India Office

402 Shivalik Shilp II, SG Highway, Ahmedabad 380015

Engineering and delivery center

© 2026 - Copyright. All Rights reserved OceanLab