wip library to store cold objects in s3, warm objects on disk, and hot objects in memory
nodejs typescript
1# Example Static Site 2 3This is a demonstration static website used in the tiered-storage library examples. 4 5## Files 6 7- **index.html** (3.5 KB) - Homepage, stored in hot + warm + cold tiers 8- **about.html** (4.2 KB) - About page, stored in warm + cold (skips hot) 9- **docs.html** (3.8 KB) - Documentation, stored in warm + cold (skips hot) 10- **style.css** (7.1 KB) - Stylesheet, stored in warm + cold (skips hot) 11- **script.js** (1.9 KB) - JavaScript, stored in warm + cold (skips hot) 12 13## Usage in Examples 14 15The `example.ts` file demonstrates how this site would be stored using the tiered-storage library: 16 171. **index.html** is stored in all tiers (hot + warm + cold) because it's the entry point and needs instant serving 182. Other HTML pages skip the hot tier to save memory 193. CSS and JS files are stored in warm + cold 204. If there were large media files, they would be stored in cold tier only 21 22## Tier Strategy 23 24``` 25Hot Tier (Memory - 100MB): 26 └── index.html (3.5 KB) 27 28Warm Tier (Disk - 10GB): 29 ├── index.html (3.5 KB) 30 ├── about.html (4.2 KB) 31 ├── docs.html (3.8 KB) 32 ├── style.css (7.1 KB) 33 └── script.js (1.9 KB) 34 35Cold Tier (S3 - Unlimited): 36 ├── index.html (3.5 KB) 37 ├── about.html (4.2 KB) 38 ├── docs.html (3.8 KB) 39 ├── style.css (7.1 KB) 40 └── script.js (1.9 KB) 41``` 42 43This strategy ensures: 44- Lightning-fast serving of the homepage (from memory) 45- Efficient use of hot tier capacity 46- All files are cached on disk for fast local access 47- S3 acts as the source of truth for disaster recovery