← All articles
5 min read

CDN vs object storage: what's the difference?

These two technologies appear constantly in discussions about file hosting, cloud infrastructure, and web performance - and they're frequently confused. They serve fundamentally different purposes, but work best when used together. Here's a clear breakdown of what each one actually does.

Object storage: the warehouse

Object storage is exactly what it sounds like - a system for storing objects (files) at scale. Unlike a traditional filesystem with folders and paths, object storage uses a flat namespace where each file (object) is identified by a unique key and stored alongside its metadata.

The defining characteristics of object storage:

Think of object storage as a warehouse. It can store an essentially unlimited number of items, is very reliable, and retrieves anything you ask for - but it's not optimised for speed or frequent access patterns.

CDN: the distribution network

A Content Delivery Network is a geographically distributed network of servers (called edge nodes or Points of Presence) that cache and serve content close to end users. A CDN doesn't store your original files - it caches copies at the edge and serves those cached copies, falling back to the origin (your object storage or server) only on a cache miss.

The defining characteristics of a CDN:

Object Storage
  • Permanent, durable storage
  • Single geographic location
  • Higher latency access
  • Low cost per GB stored
  • Source of truth
  • API access (S3-compatible)
CDN
  • Temporary cache layer
  • Global edge presence
  • Low latency delivery
  • Higher cost per GB transferred
  • Cache of origin content
  • HTTP delivery to end users

How they work together

The standard architecture combines both: files live permanently in object storage, and a CDN sits in front of it for delivery. When a user requests a file, the CDN checks its cache. A hit serves the file instantly from the nearest edge node. A miss fetches the file from object storage, caches it, then serves it - subsequent requests for the same file from nearby users hit the cache.

This architecture solves the fundamental tension in file hosting: you need massive, durable, cheap storage for billions of files, but you also need fast global delivery. Object storage gives you the first; CDN gives you the second.

When you don't need a CDN

Not every file hosting workload benefits from a CDN. For files that are accessed rarely or only once - the majority of user-generated file sharing - a CDN cache hit rate is low. You pay CDN bandwidth prices for the first request, then the cache entry expires before anyone else requests the same file.

For this access pattern, serving directly from origin storage (with a fast server and good network peering) often delivers better economics. CDNs shine for popular, frequently-accessed content: software downloads, media assets, documentation, anything accessed at scale.

A practical middle ground: Many file hosting platforms serve files directly from origin storage with an edge-side cache layer for popular content. This avoids CDN egress costs for the long tail of unique, rarely-accessed files while still caching anything that receives significant traffic - combining the economics of direct serving with the performance benefits of edge caching where it counts.

← All articles View all articles →