SDSystem DesignConcepts to case studies
System DesignDSA
x
0/311
Part 1: Foundations
Part 2: APIs and Communication
Part 3: Caching
Part 4: Data and Storage
  • Block Storage
  • Distributed File Systems
  • Object Storage
  • Erasure Coding
  • Storage Tiers (Hot, Warm, Cold)
  • RAID
  • Compression and Deduplication
  • File Storage (NFS)
Part 5: Architecture
Part 6: Distributed Systems
Part 7: Advanced Data Topics
Part 8: Operations and Security
Part 9: Estimation and Interview Method
Part 10: Case Studies
System Design/Data and Storage/Storage Systems

Object Storage

Store files as objects with a key, in near-endless space (Amazon S3).

⏱ 13 min readBeginnerMust KnowInterview FavouriteHas visualizer
SummaryConceptReal-Life ExampleWhy?Where?How It WorksStepsKey TermsPros & ConsMistakesReal WorldRead NextInterview Q&ACheat-Sheet

01Quick Summary

Object storage keeps data as objects. Each object is a file's bytes, a key (its name) and some metadata. Objects sit in a bucket. You use it over HTTP, with calls like PUT, GET and DELETE. The best-known example is Amazon S3.

  • The space is almost endless and the price per GB is low. The data is copied over several places, so it is very durable.
  • The bucket is flat. There are no real folders. A key like photos/2026/a.jpg is just one long name.
  • You replace whole objects. You cannot edit a few bytes in the middle like you can on a disk.

02Concept: What is it?

On your computer, files live in folders on a disk. In object storage there is no disk to see. You send a request over the internet: "store these bytes under this key". Later you ask: "give me the bytes for this key". The service decides where to place them and keeps several copies.

An object has three parts: the data (any size, from bytes up to several terabytes), a unique key inside its bucket, and metadata (content type, tags, times, a fingerprint called an ETag, and your own labels).

A bucket is a flat list of keys
What you see in a console
πŸ“photos/
πŸ“2026/
πŸ“2025/
πŸ“„beach.jpg
What is really stored
photos/2026/beach.jpg
photos/2026/hills.jpg
photos/2025/party.png
docs/report.pdf
Looks like folders Flat keys
The slash in a key is only a character. Tools show it as a folder, but the store sees one flat list.
🧠Block vs file vs object
Block: a raw disk for one server. File: folders you can share and edit in place. Object: whole items by key over HTTP, with huge scale and low cost, but no in-place edits.

03Real-Life Example

🍡The Cloakroom Ticket
At a big theatre cloakroom you hand over a coat and get a numbered ticket. You do not care which hook it is on. When you come back, you show the ticket and receive the same coat. You cannot ask them to change the coat's sleeve while it hangs there. To change anything, you take the coat back, fix it and hand it in again. The cloakroom can hold a million coats, and they keep spare copies in another room, in case of a fire.
Cloakroom
Object storage
Handing in a coat
PUT an object
The ticket number
The object key
Showing the ticket to get the coat back
GET by key
A label sewn into the coat
Object metadata
The whole cloakroom
A bucket
Changing a sleeve means re-handing the coat
Objects are replaced whole, not edited in place
Spare copies in another room
Replication across devices and zones for durability
A temporary pass someone else can use
A presigned URL
The basic calls
⬆️PUTkey + bytes
→↓
πŸͺ£Bucketstores and copies
→↓
⬇️GETby key
→↓
πŸ“ƒLISTby prefix
→↓
πŸ—‘οΈDELETEby key

04Why Do We Need It?

♾️Scale without planning
No disk to resize. You just keep adding objects. Buckets can hold trillions of them across a provider.
πŸ’ΈCheap
Often a few cents per GB per month, with colder classes costing far less.
πŸ›‘οΈExtremely durable
S3 advertises 99.999999999% (eleven nines) durability by spreading copies or coded pieces over several facilities.
🌐HTTP for everyone
Any language and any device can use it. Browsers can even upload straight to it.
🧩Separate from compute
Servers come and go. The data stays. Many services can read the same objects.
🧾Pay for what you use
No need to buy disks ahead of time. You can also set rules that move old data to cheaper classes.
If you have lots of files that are written once and read many times, object storage is usually the first answer.

05Where Do We Use It?

πŸ–ΌοΈImages, video, audio
User uploads and media served through a CDN.
πŸ’ΎBackups and archives
Database dumps, snapshots and long-term records.
πŸ—ƒοΈData lakes
Raw logs and Parquet files that Spark, Athena or BigQuery read.
🌍Static websites
HTML, CSS and JavaScript served from a bucket with a CDN in front.
πŸ“¦Software releases
App installers, container image layers and build artifacts.
πŸ€–ML data and models
Training sets and saved model files.

06Types / Parts / How It Works

Parts of an object store

PartWhat it isExample
BucketA named container. Its name is unique in the whole service (in S3) and you set rules per bucket.my-photos-bucket
KeyThe unique name of an object in a bucket. Up to about 1 KB in S3.photos/2026/beach.jpg
ObjectThe bytes plus metadata. Up to 5 TB in S3 (a single PUT up to 5 GB, larger needs multipart upload).a 3 MB JPEG
MetadataSystem fields (size, time, ETag, content type) and your own key-value labels.owner=asha
PrefixThe start of a key, used to list or filter. This is how folders are faked.photos/2026/
VersionWith versioning on, each overwrite keeps the old copy under an older version id.versionId=3Lg...
Policy / ACLWho may read or write. Buckets are private by default.Allow GET for role X

Storage classes (general idea)

ClassBest forCost shape
StandardHot data you read oftenHighest storage price, low read cost
Infrequent accessData read once a month or less, but needed quicklyCheaper to store, a fee for each read, minimum days
Archive (like Glacier)Compliance and old backupsCheapest to store, slow and costly to read, longer minimum days
Intelligent / auto tieringUnknown or changing patternsThe service moves objects between tiers for you, with a small monitoring fee
Strong points
What it does well
  • Huge scale, low price
  • High durability
  • Simple HTTP API
  • Great for read-heavy, write-once data
Weak points
What it does poorly
  • No in-place edits
  • Slower than a disk per request
  • No real folders or rename
  • Not a database or file server
Behind the scenes (simplified)
πŸ™‹Client
→↓HTTPS
πŸšͺAPI front endauth + routing
→↓
πŸ—‚οΈIndexkey β†’ where
→↓
πŸ’½Storage nodescopies or coded pieces
The front end checks who you are and finds where the key lives. The data is copied over several disks and zones.
VisualizerKeys and prefixes, storage classes and presigned URLsTab 1: switch the delimiter on and off, click prefixes and objects. Tab 2: change how often you read, and watch the cheapest class change. Tab 3: step through a presigned URL.
How the list call is made
Prefix to list
Bucket my-photos-bucket holds 7 objects in one flat list. There are no real folders. Each key is just a long name.
A list call with prefix β€œ(empty)” and delimiter β€œ/” returned 3 common prefixes and 1 object. The folder view is made on the fly from the key names.

07How to Use It / Steps / Implementation

Using object storage well

  1. 1
    Design the key on purpose
    Keys like tenant/2026/12/01/file.json make listing by prefix easy. Put the thing you list by first.
  2. 2
    Keep buckets private
    Turn on 'block public access'. Give apps roles with only the permissions they need.
  3. 3
    Share with presigned URLs
    Your app signs a short-lived URL. The browser uploads or downloads straight to the bucket, so large files never pass through your servers.
  4. 4
    Upload big files in parts
    Multipart upload sends parts in parallel, and a failed part can be retried alone. Use it for files above about 100 MB.
  5. 5
    Put a CDN in front for reads
    Public reads of images and video are cheaper and faster from a CDN edge.
  6. 6
    Set lifecycle rules
    Move data to colder classes after some days, and delete what you do not need (logs, temp files).
  7. 7
    Turn on versioning for important data
    It protects against overwrites and accidental deletes. Combine with cross-region replication for disaster recovery.
πŸ’‘Do not use it like a database
Do not keep a changing counter or a small record as an object that you rewrite often. Keep the metadata and lookup (user, name, permissions) in a database, and keep only the big blob in object storage, with its key stored in the database row.
⚠️Delete and rename are not what they seem
There is no rename. Renaming a "folder" copies every object under it and deletes the old ones. Deleting a prefix with millions of objects takes many requests. Plan your key layout early.

08Key Terms to Know

TermMeaning in easy words
ObjectThe data bytes plus a key and metadata, stored as one unit
BucketA named container that holds objects
KeyThe unique name of an object inside its bucket
MetadataFacts about the object: type, size, time, tags, ETag
PrefixThe beginning of a key, used to list a 'folder'
DelimiterA character (usually /) that groups keys into common prefixes when listing
DurabilityThe chance data is not lost over time (eleven nines in S3 classes)
AvailabilityThe chance you can reach the data right now. It is lower than durability.
Presigned URLA time-limited link, signed by someone with access, that lets a client use one object
Multipart uploadSending a large object in parts that are joined at the end
Storage classA price and speed tier for the data (standard, infrequent, archive)
Lifecycle ruleA rule that moves or deletes objects based on age
VersioningKeeping older versions of an object after overwrite or delete
ETagA fingerprint of the object content, often an MD5 hash for simple uploads

09Pros, Cons and Trade-offs

βœ… Pros
  • Nearly unlimited scale
  • Very high durability
  • Low cost, especially in colder classes
  • Simple HTTP API from any language
  • Strong ecosystem: CDN, lifecycle, events, analytics
⚠️ Cons
  • No in-place edits, only whole-object replace
  • Higher latency than block storage
  • No real folders, renaming is a copy
  • Per-request and data transfer fees add up
  • Not suited to databases or small random writes

Trade-offs

ChoiceWe gainWe lose
Colder storage classMuch cheaper storageRetrieval fees, delay, minimum days
Standard classFast and flat pricingCosts more for data nobody reads
Versioning onUndo for deletes and overwritesOld versions cost money until cleaned
Cross-region replicationSurvives a regional disasterDouble storage and transfer cost
Many small objectsSimple per-item modelRequest fees and overhead dominate
Object vs block storageObject: cheap, huge, sharedObject: slower, no random writes

10Common Problems and Mistakes

Common mistakes

  1. Public buckets by mistake. Many data leaks happened this way. Keep buckets private and review policies.
  2. Hot key prefixes. Very high request rates on one prefix can be throttled. S3 now scales per prefix (thousands of requests per second per prefix), so spread heavy workloads over several prefixes.
  3. Thinking it is a file system. Mounting a bucket as a drive hides slow listing and the lack of renames.
  4. Reading archive data without planning. Retrieval can take hours and cost real money.
  5. Forgetting lifecycle rules. Old logs and incomplete multipart uploads keep costing money.
  6. Many tiny files. Request fees and slow listings. Combine small files into bigger ones.
  7. Assuming eventual consistency. S3 has been strongly consistent for reads after writes since December 2020, but other stores or older systems may differ. Check your provider.
  8. Long-lived presigned URLs. Anyone with the link has access until it expires. Keep expiry short.

Things to watch

πŸ’³Egress cost
Reading data out to the internet is billed per GB. A CDN can reduce it.
πŸ”Encryption
Turn on encryption at rest. Use HTTPS in transit.
🧬Durability is not backup
Eleven nines do not protect from you deleting data. Use versioning and object lock.
⏱️Request latency
Expect tens of milliseconds for a GET, not microseconds. Cache hot data.

11Real-World Examples

πŸͺ£Amazon S3
The reference design, launched in 2006. Many services, including data lakes and backups, are built on it.
πŸ”·Google Cloud Storage and Azure Blob Storage
The same idea from other clouds, with similar classes and APIs.
🏠MinIO, Ceph RGW
Open-source stores that speak the S3 API, for your own servers.
πŸ“¦Dropbox and others
Many file-sharing products store file contents as objects (general idea), with a database for names and folders.
🎞️Streaming services
Video files are kept in object storage and copied out to CDN edges.
πŸ§ͺData lakes
Companies keep raw event data as Parquet or JSON objects, queried by engines such as Spark or Athena.
πŸ“Note
Limits, prices and consistency rules shown here follow S3 as a common reference. Always check the current documentation of your provider.
Mini case: uploading a profile photo
πŸ“±Mobile app
→↓1. ask to upload
πŸ–₯️API serversigns a URL
←2. URL
πŸͺ£Bucket3. PUT directly
→↓4. event
βš™οΈResize workermakes thumbnails
The app server never touches the big file. It only issues a signed URL and later stores the key.

12Related Topics to Read Next

Block Storage→

The fast, raw disk alternative for databases.

Distributed File Systems→

File-style access over many machines, such as HDFS.

Erasure Coding→

How object stores get eleven nines without a full 3x cost.

CDN→

Put edge caches in front of a bucket for fast public reads.

Replication→

Copy data across zones and regions for safety.

Checksums→

How ETags and integrity checks catch damaged data.

13Interview Questions with Short Answers

14Quick Revision Cheat-Sheet

  • βœ”What: objects (bytes + key + metadata) in flat buckets, used over HTTP.
  • βœ”Folders: not real. A prefix plus delimiter fakes them. Rename = copy and delete.
  • βœ”Strengths: huge scale, low cost, eleven nines durability, simple API.
  • βœ”Weak at: in-place edits, small random writes, low latency.
  • βœ”Classes: standard, infrequent, archive. Lifecycle rules move data down by age.
  • βœ”Sharing: presigned URLs for direct, temporary upload or download.
  • βœ”Pair with: a database for metadata, a CDN for reads, multipart upload for big files.
  • βœ”One line: β€œA bottomless, cheap, durable bucket of whole files: great for the big stuff, wrong for databases.”
← Previous
Distributed File Systems
Next β†’
Erasure Coding