SD System Design In Depth
0%
lesson system-designstoragearchival

Hot and cold storage, archival

Module 2.2: NoSQL Architectures, Partitioning & IDs Updated Sep 17, 2026
📄 Cheat Sheet
AWS re:Invent 2021 - Best practices for cost optimization with Amazon S3
AWS Events AWS re:Invent 2021 - Best practices for cost optimization with Amazon S3 Watch on YouTube ↗

The S3 team walks through storage classes, lifecycle transitions, Intelligent-Tiering and the retrieval-cost traps, which is exactly the tiering economics this lesson models.

0:00 / --:--

Under the Hood: The Economics and Hardware of Data Lifecycles

In large-scale platforms, data often exhibits steep temporal access decay: in many workloads the large majority of reads (for example 90%) target data written in the last few days. Measure your own access pattern before choosing tier boundaries. Keeping multi-year historical logs or audit records on high-performance NVMe SSDs in primary transactional clusters costs hundreds of thousands of dollars per month in idle compute and storage provisioned IOPS.

Multi-Tier Storage Architecture

flowchart TD App["Application Tier"] --> Tier1["Hot Tier: NVMe SSDs (PostgreSQL / Redis / Cassandra)"] Tier1 -.->|"Batch ETL / Parquet Compaction (After 30 Days)"| Tier2["Warm Tier: AWS S3 Standard / GCS"] Tier2 -.->|"Lifecycle Policy (After 90 Days)"| Tier3["Cold Tier: S3 Glacier Flexible Retrieval"] Tier3 -.->|"Archive Policy (After 365 Days)"| Tier4["Deep Archive: S3 Glacier Deep Archive ($0.00099/GB/mo)"] subgraph QueryEngines ["Analytical Query Engines"] Tier2 --> Athena["Serverless Queries: AWS Athena / DuckDB"] Tier1 --> Primary["Transactional Queries (< 5ms)"] end

Hardware, Latency, and Cost Breakdown

Storage TierUnderlying HardwareP99 Access LatencyCost per TB / Month
Hot (Transactional)Local NVMe SSD / Provisioned IOPS EBS (io2)Sub-millisecond to 5ms 00.00 - 80.00
Warm (Infrequent)Multi-tenant Cloud Object Store (S3 Standard / Infrequent)50ms - 150ms 2.50 - $23.00
Cold (Glacier)Not disclosed by AWSFlexible Retrieval: 1-5 min (Expedited), 3-5 h (Standard), 5-12 h (Bulk). Glacier Instant Retrieval: milliseconds$3.60
Deep ArchiveNot disclosed by AWS12 - 48 hours retrieval$0.99 (99% cost reduction)

Tombstones and Lifecycle Compaction

When archiving data from distributed databases like Cassandra, deleted rows, expired TTLs and null writes leave tombstone markers. If cold archival jobs blindly export tables without compacting tombstones, query engines reading the archived Parquet files encounter performance degradation. Modern pipelines run compaction jobs before compressing data into columnar Parquet/ORC chunks for cold storage.

Check yourself Question 1 of 3
Setting tier boundaries recall
From: Under the Hood: The Economics and Hardware of Data Lifecycles

What should decide when records move from the hot tier to cheaper tiers?

Key Takeaways

Reads typically concentrate on recent data (for example, 90% on the last week in many workloads); tiered storage migrates aged data to reduce storage bills by up to 99%.
Hot tiers use local NVMe SSDs; cold tiers (S3 Glacier classes) trade retrieval latency and fees for cost; AWS does not disclose the underlying media.
Compaction to columnar Parquet formats before object storage migration enables serverless querying via Athena and DuckDB.
Was this lesson helpful? Spot an issue or have a suggestion? Let us know on GitHub.
Report an issue