Blob & Object Storage
BeginnerObject storage (S3, GCS, Azure Blob) stores unstructured data (images, videos, backups) as objects with metadata in a flat namespace. It offers virtually unlimited scale, high durability (11 nines), and low cost.
Overview
Object storage stores data as objects in a flat namespace (no directories — paths are just key prefixes). Each object has a key (unique identifier), the data (blob), and metadata (content-type, custom tags). Unlike file systems (hierarchical, POSIX) or block storage (raw volumes), object storage is accessed via HTTP APIs (PUT/GET/DELETE). Amazon S3 is the industry standard, offering 99.999999999% (11 nines) durability. Object storage is ideal for static assets (images, CSS, JS), media files (video, audio), backups, data lake storage, and serving static websites. It is NOT suitable for frequently updated data, POSIX file operations, or database storage. Access patterns include direct access via pre-signed URLs, CDN distribution, and lifecycle policies for automatic tiering (S3 Standard → S3 Glacier for archival).
Object Storage Concepts
Objects are stored in buckets with unique keys. No real directory hierarchy — "folders" are just key prefixes. Access via HTTP REST API.
// S3 object structure
// Bucket: my-app-assets
// Key: uploads/users/u-42/avatar.jpg
// → Not a real folder structure, just a key string
//
// Object has:
// Key: uploads/users/u-42/avatar.jpg
// Data: (binary content)
// Metadata: Content-Type: image/jpeg, x-amz-meta-user-id: u-42
// Size: up to 5 TB per object
// ETag: MD5 hash for integrity
// S3 durability: 99.999999999% (11 nines)
// = losing 1 object out of 100 billion per year
// Achieved via automatic replication across 3+ AZs
// AWS SDK upload example (Java)
s3Client.putObject(
PutObjectRequest.builder()
.bucket("my-app-assets")
.key("uploads/users/u-42/avatar.jpg")
.contentType("image/jpeg")
.build(),
RequestBody.fromFile(avatarFile)
);Pre-Signed URLs & CDN Integration
Pre-signed URLs grant temporary access to private objects without exposing credentials. Combine with a CDN for global, low-latency delivery.
// Pre-signed URL — temporary access to private object
URL presignedUrl = s3Presigner.presignGetObject(
GetObjectPresignRequest.builder()
.signatureDuration(Duration.ofMinutes(15))
.getObjectRequest(r -> r.bucket("private-docs").key("reports/q1.pdf"))
.build()
).url();
// Returns: https://private-docs.s3.amazonaws.com/reports/q1.pdf?X-Amz-Signature=...
// Valid for 15 minutes, no AWS credentials needed by client
// S3 + CloudFront architecture for static assets
// User → CloudFront (CDN edge) → S3 (origin)
// First request: CDN fetches from S3, caches at edge
// Subsequent: Served from edge cache (< 20ms)
// Lifecycle policy — automatic cost optimisation
// Day 0–30: S3 Standard ($0.023/GB)
// Day 31–90: S3 Standard-IA ($0.0125/GB)
// Day 91–365: S3 Glacier ($0.004/GB)
// Day 366+: S3 Glacier Deep Archive ($0.00099/GB)Key Points to Remember
- 1Object storage stores unstructured data (images, videos, backups) in a flat namespace of key-value objects.
- 2S3 provides 11 nines of durability via automatic multi-AZ replication.
- 3Pre-signed URLs grant temporary access to private objects without exposing credentials.
- 4Lifecycle policies automatically tier data from hot to cold storage for cost optimisation.
- 5Combine with CDN (CloudFront) for low-latency global delivery of static assets.
Interview Questions
Sign in to ask AriaWhat is object storage and how does it differ from file and block storage?
How does S3 achieve 11 nines of durability?
What are pre-signed URLs and when would you use them?
Design a media upload and serving system for a social media platform.
How would you design an S3-like object storage system?
Ask Aria about Blob & Object Storage
Your personal AI tutor — ask anything about this concept
Revision Status
Personal Notes
Sign in to save personal notes for this topic.
Discussion
Sign in to join the discussion.