Skip to content

Capacity Estimation: recap and quiz

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
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

“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.

  1. Users and requests. Daily users, the requests each makes that reach the system, and the peak-to-average ratio. Say where each came from.
  2. Rate. The average is requests per day ÷ 86,400, and the peak is the average times the ratio.
  3. Instances. The peak ÷ (what one instance carries × the target utilisation), rounded up, plus spares if the system must survive losing some.
  4. Storage. Events per day × size × copies × days kept, and then the room a disk needs.
  5. Bandwidth. The peak × payload × 8 bits for the link, and the average × payload × the seconds in a month for the transfer.
  6. Cost. Each quantity times a price from a list you checked, and the cost per million requests.
  7. Check. A second route, a stated safety factor, and the one assumption that the answer depends on most.

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.

Question 1 of 8

A product has 2 million daily active users. Each makes 25 requests a day on average, and its busiest moment is 3 times busier than the average.

What peak request rate must it carry?

Enter a number and choose its unit.

Question 2 of 8

A service writes 50 million events a day of 2 kB each. It keeps two full copies of every event, and deletes events older than 90 days.

How much storage does it need once the 90 days have filled?

Enter a number and choose its unit.

Question 3 of 8

A system adds 100 GB a day, counting every copy, and deletes anything older than 30 days. It has been running for a year.

How much data is stored now?

Enter a number and choose its unit.

Question 4 of 8

A service peaks at 3,000 requests per second, and each response is 20 kB.

What link speed does the peak need?

Enter a number and choose its unit.

Question 5 of 8

A month's bill has three lines: 8 instances at 150 each, 20,000 GB stored at 0.2 per GB per month, and 10,000 GB sent out at 0.08 per GB. The month served 500 million requests. The prices are round illustrative numbers, in no currency.

What is the cost of a million requests?

Enter a number and choose its unit.

Question 6 of 8

A fleet of 10 instances serves at most 500 requests per second each. Its normal peak is 3,000 requests per second. A one-off spike makes the peak 2.5 times higher.

At the spike, what share of the fleet's capacity is the demand?

Enter a number and choose its unit.

Question 7 of 8

A back-of-envelope estimate rounds each of three numbers to the nearest power of ten, then multiplies them.

How far off can the result be, at worst?

Choose one answer.

Question 8 of 8

Which statements about estimating a system are correct?

Choose every answer that applies.

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.