Part 6 of 6 · 4 min read
Exercises
Easy
Easy 1: Pick the load parameter (10 minutes)
A video platform's main scaling challenge comes from popular videos receiving a huge, uneven number of views compared to most videos. What load parameter best captures this challenge?
Done when: you name something like "views per video" or "view count distribution across videos," rather than a flat "total views per day."
Hint
the challenge comes from unevenness across videos, not total volume, so the parameter should capture that skew.
Easy 2: Throughput or response time (10 minutes)
A nightly batch job reprocesses a year of order data; a checkout API answers each customer's request live. Which metric, throughput or response time, matters more for each, and why?
Done when: you correctly match throughput to the batch job and response time to the checkout API, each with a one-line reason.
Hint
a batch job cares about total work done over time; a live API cares about how fast any one request comes back.
Easy 3: Read a percentile (10 minutes)
A service reports a p95 response time of 300 ms. In plain words, what does that mean about the service's requests?
Done when: your explanation states that 95 out of 100 requests finish in under 300 ms, and 5 out of 100 take 300 ms or longer.
Hint
p95 describes the threshold below which 95 out of 100 requests fall.
Medium
Medium 1: Compute percentiles by hand (20 minutes)
Given the sorted response times in milliseconds [50, 60, 70, 80, 90, 100, 110, 400, 900, 1500], estimate the median and the p90.
Done when: you identify the median as roughly the midpoint value (between 90 and 100) and the p90 as roughly the value near the 9th position (900).
Hint
with 10 sorted values, the median sits around positions 5 and 6, and the p90 sits around position 9.
Medium 2: Diagnose a misleading average (20 minutes)
A dashboard shows an average response time of 180 ms for an endpoint, and the team concludes performance is fine. Explain what the average could be hiding, and what you would check instead.
Done when: you explain that a small number of very slow outliers could be pulling the mean up while most requests are fast, or vice versa hiding a real tail problem, and that checking p95/p99 would reveal it.
Hint
a wide gap between the average and the median or p95 usually means a skewed distribution, not a uniformly fine one.
Medium 3: Explain head-of-line blocking (20 minutes)
A database server limits itself to 20 concurrent connections. During a spike, requests begin queueing behind a few unusually slow queries. Explain what happens to the response times of fast requests arriving during this spike.
Done when: you explain that fast requests get stuck waiting behind the slow ones already being processed, so their client-visible response time grows even though their own actual processing is quick.
Hint
even a fast request's response time grows once it has to wait in line behind slower ones already occupying the limited concurrent slots.
Hard
Hard 1: Trace a fan-out problem (25 minutes)
The bookstore's "new release" notification system fans out one email per follower when a book is published. One author has 500,000 followers. Explain why this system's real bottleneck is not well described by "books published per day," and propose a load parameter that would be.
Done when: you explain that a low, steady publish rate can still produce an enormous spike in actual work due to fan-out, and propose a parameter like "followers per author" or "emails sent per publish event."
Hint
the real driver of load is how many downstream actions one event triggers, which "books published per day" does not capture at all.
Hard 2: Design around a multi-call fan-out (25 minutes)
An order page calls four backend services in parallel, each with its own p99 of 150 ms. Explain why the order page's own end-to-end p99 will likely be worse than 150 ms, and propose one mitigation.
Done when: you explain that the page waits on the slowest of the four calls, so its tail latency compounds across calls, and propose a mitigation such as setting a tight timeout with a fallback, or reducing the number of calls on the critical path.
Hint
the page's response time is bounded below by the slowest of the four parallel calls, so reducing dependencies or bounding the slowest call's time directly improves the page's own tail.
Hard 3: Justify measuring on the client side (25 minutes)
A team benchmarking a new database feature generates load by having a single test client wait for each response before sending the next request. Explain why this test setup is likely to understate real queueing delays, and what the client should do instead.
Done when: you explain that waiting for each response before sending the next artificially prevents queues from building up the way they would under real concurrent traffic, and that the load generator should send requests independently of response time to realistically reproduce queueing.
Hint
a client that waits for each response before sending the next artificially limits concurrency, hiding exactly the queueing effects a production system under real load would actually experience.