About Tiered Storage
The Problem
Modern applications need to balance three competing concerns:
- Speed: Users expect instant responses
- Cost: Keeping everything in memory is expensive
- Reliability: Data must be durable and recoverable
The Solution
Tiered storage provides the best of all worlds by automatically managing data across multiple storage tiers:
🚀 Performance
Hot tier (memory) serves critical files like index.html in microseconds
💰 Cost-Effective
Warm tier (disk) and cold tier (S3) handle bulk storage efficiently
🛡️ Reliability
Cold tier acts as source of truth with automatic backups
Use Cases
Static Site Hosting
Store index.html in memory for instant serving, while keeping images and videos on disk/S3. Perfect for CDN-like performance on a single server.
Content Delivery
Automatically promote popular content to hot tier based on access patterns. Rarely accessed content stays in cold storage.
Database Caching
Cache query results in memory, with overflow to disk and S3. Automatic TTL management keeps data fresh.
How This Demo Works
This example site is stored using the tiered-storage library:
index.html- Stored in all tiers (hot + warm + cold) for instant accessabout.html- Stored in warm + cold (skips hot to save memory)style.css- Stored in warm + coldscript.js- Stored in warm + coldhero-image.jpg- Large file, stored in cold tier only
When you request a page, the library automatically checks hot → warm → cold and serves from the fastest available tier.