Capacity Estimation: recap and quiz
The module in five sentences
Section titled “The module in five sentences”- Requests per second and peak traffic. Users times requests each is a day’s volume, dividing by 86,400 gives the average rate, and the peak is the average times a ratio, which is the number to size for and the weakest of the three.
- Storage and retention. Storage is events per day times size, copies and days kept, it stops growing once the retention period has filled, and it is Little’s Law applied to data.
- Bandwidth. A link is sized in bits per second at the peak, a month’s transfer is built from the average in bytes, and a byte is 8 bits.
- Estimating by powers of ten. Rounding to the nearest power of ten can be off by 3.16 times for each number and the errors multiply, so keep a significant digit, check by a second route and state a safety factor.
- Cost estimation. A bill is quantities times prices, the largest line is not always the obvious one, and the prices are inputs that you look up.
How each one goes wrong
Section titled “How each one goes wrong”| Idea | The common mistake | The correction |
|---|---|---|
| Traffic | Sizing for the average | Size for the peak, and say where the ratio came from |
| Storage | Multiplying by a year of writing when old data is deleted | The storage settles at the daily volume times the retention |
| Bandwidth | Mixing bits and bytes, or holding the peak for a month | Bits at the peak for the link, bytes at the average for the month |
| Powers of ten | Rounding every number to a power of ten | Keep one significant digit, and check by a second route |
| Cost | Taking prices from the estimate | The estimate gives the quantities, and the prices are yours to look up |
A list: estimate a system in order
Section titled “A list: estimate a system in order”“It needs a lot of servers” cannot be checked. An estimate can be, because every step is a number with a unit and a source.
- Users and requests. Daily users, the requests each makes that reach the system, and the peak-to-average ratio. Say where each came from.
- Rate. The average is requests per day ÷ 86,400, and the peak is the average times the ratio.
- Instances. The peak ÷ (what one instance carries × the target utilisation), rounded up, plus spares if the system must survive losing some.
- Storage. Events per day × size × copies × days kept, and then the room a disk needs.
- Bandwidth. The peak × payload × 8 bits for the link, and the average × payload × the seconds in a month for the transfer.
- Cost. Each quantity times a price from a list you checked, and the cost per million requests.
- Check. A second route, a stated safety factor, and the one assumption that the answer depends on most.
Check what you have learnt
Section titled “Check what you have learnt”Eight questions cover the whole module. Every option is explained, whether it is right or wrong.
Capacity Estimation: module quiz
This quiz needs JavaScript to check your answers.
What comes next
Section titled “What comes next”The next module, Scalability, turns from how much to how: adding capacity by making one machine bigger or by adding more machines, and what keeping state in a server does to that choice. The estimates of this module give it its numbers: the peak to carry, and how many instances that takes.
Your progress
Built by GhaziAlibi.
© ShardCraft. All rights reserved.