What is object storage? How apps store billions of photos and videos

Object storage keeps files as objects in huge buckets, each with a unique key and some labels. It's cheap, nearly endless and very durable, which is why photos, videos and backups live there. Here is how it works and when to use it.

A huge warehouse with endless rows of identical boxes on shelves, fading into the distance. A forklift lifts one box marked with a long key, photos/user42/beach.jpg, and a paper tag tied to it lists size 2 MB, type image/jpeg and uploaded 24 Nov.
Fig. 1 — Object storage is a giant warehouse. Every box has a unique label and a tag, and there's always room for more.

Every day, people upload enormous numbers of photos and videos to apps. Where do they all go? Not into a normal database: a database is built for small, structured rows, not multi-megabyte videos. And not onto one server’s hard disk: it would fill up quickly, and if that disk died, the photos would be gone.

They go into object storage. This guide explains what object storage is, how it differs from the disks you know, and how it fits into a system design.

What is object storage?

Object storage is a way of storing files as objects inside big containers called buckets. Each object has three parts:

  1. The data: the file itself, such as a photo, video, PDF or backup.
  2. A key: a unique name inside the bucket, like photos/user42/beach.jpg.
  3. Metadata: labels about the file, such as its size, type (image/jpeg) and upload date, plus any custom tags you add.

You don’t open, edit and save objects the way you do files on your laptop. You put a whole object, get a whole object, or delete it, usually over a simple web API. To change a photo, you upload a new version.

The best-known service is Amazon S3 (Simple Storage Service). Others include Google Cloud Storage, Azure Blob Storage and Cloudflare R2, and you can run your own with open-source tools like MinIO or Ceph. Many of them speak the same “S3-compatible” API.

  • Nearly endless. You never manage disks or think about running out of space. Store one file or a few billion.
  • Very durable. Each object is stored as several copies (or coded pieces) across separate machines and buildings. Amazon S3 is designed for 99.999999999% (“eleven nines”) durability of objects over a year, meaning losing an object is extremely unlikely.
  • Cheap. Storing data costs far less per gigabyte than databases or fast disks, with even cheaper “cold” tiers for files you rarely read, like old backups.
  • Reachable from anywhere. Every object can be fetched by its key over HTTP, which makes it easy to put a CDN in front.

Object vs block vs file storage

There are three main ways computers store data, and it helps to see them side by side.

Block storage File storage Object storage
Think of it as A raw hard disk A shared folder A warehouse of labelled boxes
How you use it A server formats it and runs a file system or database on it Folders and files, open and edit in place Put, get and delete whole objects by key
Typical use Database disks, server boot disks Shared team drives, apps that need a normal folder Photos, videos, backups, logs, static websites
Scales to One server’s disk size Large, but with limits Practically unlimited
Speed Fastest, lowest latency Fast Higher latency per request, but huge total throughput
Examples Amazon EBS, a local SSD Amazon EFS, NFS shares Amazon S3, Google Cloud Storage, Azure Blob

A rule of thumb: databases sit on block storage; big files sit in object storage.

How it fits into a system design

Here’s the classic pattern for any app with user uploads, such as profile photos, documents or videos.

Five numbered steps. One, the app asks the API server for permission to upload. Two, the server returns a presigned upload URL that works for a few minutes. Three, the app uploads the photo directly to the object storage bucket, not through the server. Four, the server saves just the key, photos/user42/beach.jpg, in the database next to the user's row. Five, other users download the photo through a CDN that fetches it from the bucket.
Big files go straight between the app and object storage. The database only keeps the key, a short piece of text.
  1. The app asks your server for permission to upload.
  2. The server returns a presigned URL: a special link, signed by the server, that allows one upload to one key for a few minutes. No password is shared.
  3. The app uploads directly to the bucket using that link. The large file never passes through your servers, which keeps them light.
  4. Your database stores only the key (photos/user42/beach.jpg) and maybe some details, next to the user’s record.
  5. Downloads go through a CDN, which fetches from the bucket once and then serves copies close to users.

This keeps each part doing what it’s good at: the database handles small, structured data; object storage handles big files; the CDN handles fast delivery.

Where object storage is not the right fit

  • Frequent small edits. You can’t change bytes in the middle of an object. Rewriting a whole 1 GB file to change one line is wasteful.
  • Database files. Databases need fast, in-place reads and writes; give them block storage.
  • Lookups by content. Object storage finds things by key, not “all photos taken in Goa”. Keep searchable details in a database, and the file in object storage.
  • Very low latency for each read. Each request has more overhead than a local disk. Cache or use a CDN for hot files.

Common misconceptions

“Object storage is just a hard drive in the cloud.” It’s a different model: whole objects, accessed by key over an API, spread across many machines.

“Put the images in the database as blobs.” Possible, but usually a bad trade: it bloats the database, slows backups and makes the most expensive part of your system serve the heaviest data.

“Buckets are private by default, so I’m safe.” Most providers now make new buckets private by default, but misconfigured public buckets have caused many real data leaks. Check access settings deliberately, and use presigned URLs for sharing.

Key takeaways

  • Object storage keeps files as objects (data + key + metadata) in buckets.
  • You put, get and delete whole objects over an API, no in-place editing.
  • It’s nearly endless, very durable and cheap, which makes it the home for photos, videos, backups and logs.
  • Block storage is for databases and disks; object storage is for big files.
  • Classic pattern: presigned upload → key saved in the database → downloads through a CDN.

Frequently asked questions

What is object storage in simple words?

Object storage is a way to save files in the cloud where each file is stored as an object with a unique name and some labels. You upload and download whole files by name, and the storage can grow almost without limit.

Is Amazon S3 object storage?

Yes. Amazon S3 is the best-known object storage service. Google Cloud Storage, Azure Blob Storage and Cloudflare R2 are similar services.

What is the difference between object storage and block storage?

Block storage acts like a raw disk attached to one server, and is used for databases and operating systems. Object storage holds whole files accessed by key over an API, scales almost without limit, and is used for media, backups and logs.

Should I store images in a database or object storage?

Usually object storage. Store the image in a bucket and keep only its key and details in your database. This keeps the database small and fast.

What is a presigned URL?

A presigned URL is a temporary link, signed by your server, that lets someone upload or download one specific object for a short time without having your storage credentials.

Comments

LEAVE A COMMENT
No sign-up. Comments appear after a quick review.