System Design · Senior · Question 48 of 75
How do you estimate storage requirements for 5 years of chat messages for 1M users?
- ✓Correct answer: Estimate volume: messages × size × retention, plus replicas
- 2Keep everything in server memory - it's the fastest
- 3Storage doesn't matter at the design stage
Explanation
For example, 1M × 50 messages × 200 bytes ≈ 10 GB per day, ≈ 18 TB over 5 years before replication and indexes. Such an estimate drives the choice of storage, partitioning by conversation and time, and archiving of old data.