Cold Storage

Trading speed for massive cost savings on data you rarely need.

The idea

Not all data is equal. A user's current profile picture needs to load in milliseconds (Hot storage). Their 10-year-old chat history might only be requested once a year for legal reasons. Keeping that old data on fast NVMe SSDs is a massive waste of money. Instead, we move it to Cold Storage (like AWS S3 Glacier), where it is stored on incredibly cheap, slow media, but takes hours to retrieve.

Step 1: The data lifecycle. Fresh data goes to Hot Storage.

How it works (Tiering)

Most architectures implement automated lifecycle rules. Once data reaches a certain age without being accessed, it is automatically transitioned down the tiers.

# Defining an S3 Lifecycle Rule (Conceptual JSON)

{
  "Rules": [
    {
      "ID": "MoveOldChatLogsToColdStorage",
      "Prefix": "chat-backups/",
      "Status": "Enabled",
      "Transitions": [
        {
          # After 30 days, move from Standard (Hot) to Infrequent Access (Warm)
          "Days": 30,
          "StorageClass": "STANDARD_IA"
        },
        {
          # After 365 days, move to Glacier (Cold)
          "Days": 365,
          "StorageClass": "GLACIER"
        }
      ],
      "Expiration": {
        # Delete forever after 7 years for compliance
        "Days": 2555
      }
    }
  ]
}

Cost

Cold storage is optimized purely for storage cost (e.g., $0.00099 per GB/month vs $0.023 for Hot). However, you pay a steep penalty in Retrieval Fees and Latency. Fetching data can cost 10x more than storing it, and you must wait 12-48 hours for the cloud provider to un-archive it.

Watch out for