Course contentsShow
← System Design
Lesson 1623 of 1,91939. Real-World System: Image and Video HostingFree lesson

Cold Storage and Archival

Archive rarely accessed media to low-cost storage like AWS Glacier while maintaining retrieval capabilities.

Cold Storage and Archival

What You'll Learn

You'll learn how to archive rarely accessed media to ultra-low-cost storage solutions while maintaining the ability to retrieve files when needed.

The Core Problem

When hosting millions of images and videos, most content becomes "cold" over time—accessed infrequently or not at all. Keeping everything in expensive, high-performance object storage like S3 Standard wastes money. You need a way to move old content to cheaper storage while preserving access.

How Cold Storage Works

Think of cold storage like a library's off-site warehouse: books nobody borrows get moved there. They're still available, just slower to retrieve.

Storage Classes by Temperature

Hot: Frequently accessed (S3 Standard, GCS Standard)
Warm: Occasionally accessed (S3 Infrequent Access)
Cold: Rarely accessed (S3 Glacier Flexible Retrieval)
Frozen: Almost never accessed (S3 Glacier Deep Archive)

Archival Strategy

  1. Identify candidates: Media older than 6-12 months with minimal access
  2. Lifecycle policies: Automate transitions after N days without access
  3. Metadata tracking: Update your database to flag archived status
  4. Retrieval tiers: Choose speed vs cost (instant, 3-5 hours, 12+ hours)

Cost Savings

Storage costs drop dramatically:

  • S3 Standard: ~$23/TB/month
  • Glacier Flexible: ~$4/TB/month
  • Glacier Deep Archive: ~$1/TB/month

Retrieval fees apply, but if access is rare (e.g., <1% monthly), savings are massive.

Implementation Pattern

Configure lifecycle rules in your object storage to automatically transition objects based on age or access patterns. Keep metadata "warm" so users can browse—only the actual file lives in cold storage. When requested, initiate retrieval and notify the user (or cache the restored version temporarily).

Key Takeaway: Cold storage and archival drastically reduce costs for rarely accessed media by moving content to ultra-cheap tiers like AWS Glacier, with retrieval possible in hours when needed—balancing economy with availability.