Blob Storage

Using services like Amazon S3 to store large, unstructured files like videos and PDFs

Overview

Blob (Binary Large Object) storage is designed for storing unstructured data like images, videos, documents, and backups. Services like Amazon S3, Azure Blob Storage, and Google Cloud Storage are optimized for this use case.

Traditional databases are poor for large files - blob storage provides scalable, durable, and cost-effective solutions.

Key Concepts

Object Storage

Files stored as objects with metadata. Accessed via unique keys/URLs. No hierarchical file system.

Bucket/Container

Top-level organizational unit for storing objects. Like a folder but flatter structure.

Durability

Data replicated across multiple locations. S3 offers 99.999999999% (11 nines) durability.

CDN Integration

Blob storage often integrates with CDNs for fast global delivery of static assets.

How It Works

Upload Flow:

  1. User uploads file to your app
  2. App generates unique filename
  3. App uploads to blob storage (S3, Azure, GCS)
  4. Storage returns public URL
  5. App stores URL in database
  6. Serves file via URL (optionally through CDN)

Example S3 URL: https://mybucket.s3.amazonaws.com/images/photo123.jpg

Database only stores the URL, not the file itself.

Use Cases

Image and video storage for social media

Document management systems

Backup and disaster recovery

Log file archival

Static website hosting

Media streaming

Data lakes for analytics

Best Practices

Use CDN in front of blob storage for frequently accessed files

Implement proper access controls (private vs public)

Use signed URLs for temporary access

Enable versioning for critical data

Set up lifecycle policies (move old data to cheaper storage tiers)

Compress files before upload when possible

Use appropriate storage classes (hot, cool, archive)

Implement retry logic for uploads

Store metadata in database, files in blob storage

Interview Tips

What Interviewers Look For

  • Explain why databases are bad for large files: blob fields break normalization, slow queries, expensive storage

  • Discuss major providers: AWS S3, Azure Blob Storage, Google Cloud Storage

  • Mention durability: how blob storage replicates across regions

  • Talk about cost optimization: storage tiers (hot/cool/archive)

  • Explain CDN integration for performance

  • Discuss security: public vs private buckets, signed URLs, IAM policies

  • Mention use cases: images, videos, backups, static sites

AI Tutor

Ask about the topic

Sign in Required

Please sign in to use the AI tutor

Sign In
Blob Storage - Module 3: Database Fundamentals & Storage | System Design | Revise Algo