StackGrab

Stage 4 · Recap

What stuck?

A few checks to make the ideas yours, then the next stop on the route.

What to remember

  • Common operations span about eight powers of ten, from nanoseconds in a cache to hundreds of milliseconds across a continent.
  • There are about 86,400 seconds in a day, so average QPS is requests per day divided by 86,400; peak is an assumption, often 2–3× that.
  • Storage is items × size × retention, using decimal powers of ten for quick estimates.
  • Bandwidth is QPS × response size; rough cross-checks rule designs in or out before you build them.

Quick check

0 of 6 answered

All 6 questions are here so you can see the climb from recall to challenge. Answer them, then check. 4 of 6 passes; you can retry with new questions. No penalty for guessing.

  1. Warm-up
    1.Roughly how long is a round trip between two machines in one data center?
  2. Warm-up
    2.About how many seconds are in a day, for back-of-envelope math?
  3. Apply
    3.A service receives 5 million requests per day. What is the approximate average QPS?
  4. Apply
    4.A new app stores 500,000 photos a day at about 1 MB each, kept for one year (about 365 days). Roughly how much storage is that?
  5. Challenge
    5.Average traffic is 2,300 QPS, peak is assumed to be 3× average, and each response is 10 KB. Roughly what peak outbound bandwidth is needed?
  6. Challenge
    6.On the human-scale ladder, 1 nanosecond becomes 1 second. A data-center round trip is about 0.5 ms. How long is that on the human scale?
06

Next lesson

Processes, threads, concurrency

Continue the journey →