Estimating storage and bandwidth over years
35 min · Intermediate
Storage estimate = records per day × bytes per record × 365 × years, then multiplied for indexes, copies and growth. Bandwidth follows the same idea: requests per second × bytes per response.
Topics in this lesson
- Records per day × bytes per record × days × years
- Replication factor, indexes and growth
- Images and media dominate: object storage vs the database
- Bandwidth: requests × response size
- Worksheet: 5-year storage for ShopLite
Key points
- Storage = records/day × bytes × 365 × years, for each kind of growing data.
- Multiply for indexes (≈ ×1.5) and copies (×3), and apply growth year by year.
- Media is thousands of times bigger than rows: store files in object storage, keep only keys in the database.
- Bandwidth = RPS × response size; network speeds are in bits (× 8).
Interview questions this lesson answers
- How do you estimate storage for five years?
- Why should images not be stored in the database?
- How do you estimate bandwidth?
- Your estimate says 150 GB of database in five years. Do you need sharding?
- What is the difference between MB/s and Mbit/s?
- Why include growth in a storage estimate?
Sign in to continue this lesson
Create an account to read every lesson, practise with the exercises and keep track of your progress.