How do you estimate the storage a system will need over several years?
MediumConceptBack-of-the-Envelope Estimation
Answer
Multiply new records per day by the average record size, then by the retention period and the replication factor. Estimate small metadata and large media separately, because media usually dominates.
- Example: 10 million new posts a day at about 1 KB each is 10 GB per day, about 3.65 TB per year, and roughly 18 TB over five years.
- Replication: keeping three copies brings this to about 55 TB.
- Media: if 10% of posts carry a 500 KB image, that adds 500 GB per day, which is why images belong in object storage behind a CDN.
- Add headroom for indexes and growth, and use the result to decide whether the data fits on one machine or must be sharded.
More in Back-of-the-Envelope Estimation
| # | Problem | Platform | Difficulty | Open | 1st1st Visit | 2nd2nd Visit | RevRevise |
|---|---|---|---|---|---|---|---|
| 1 | Which numbers should you know for back-of-the-envelope estimation? | Concept | Easy | Read the answer to Which numbers should you know for back-of-the-envelope estimation? | |||
| 2 | How do you estimate the queries per second (QPS) a system must handle? | Concept | Medium | Read the answer to How do you estimate the queries per second (QPS) a system must handle? | |||
| 3 | How do you estimate the storage a system will need over several years? | Concept | Medium | Read the answer to How do you estimate the storage a system will need over several years? | |||
| 4 | How do you estimate bandwidth, cache size and the number of servers? | Concept | Medium | Read the answer to How do you estimate bandwidth, cache size and the number of servers? |