Part 8 of 8 · 2 min read
Exercises
Easy
Easy 1: Percentile reading (20 minutes)
Given 20 response times you make up, find p50 and p95 by sorting. Compare with the mean.
Done when: a sorted list and three numbers.
Hint
Sort first, then count in from the left.
Easy 2: Tail arithmetic (20 minutes)
A page makes 30 backend calls and 0.5 percent of calls are slow. Find the share of slow pages.
Done when: a number with the working.
Hint
One minus the chance that all calls are fast.
Easy 3: Instances needed (20 minutes)
Peak is 2,400 requests per second and safe capacity per instance is 300. How many instances for load only, and with one of four zones lost?
Done when: two numbers.
Hint
With one zone of four gone, three zones carry the peak.
Medium
Medium 1: Open or closed (30 minutes)
A service has 10 workers and 100 ms per request. Compare a closed-loop test with 10 users and an open-loop test at 120 requests per second. Describe the queue in each.
Done when: two descriptions with numbers.
Hint
Capacity here is workers divided by time per request.
Medium 2: Write a load generator (30 minutes)
Write a small open-loop load generator that sends requests at a set rate and records client-side latency percentiles.
Done when: working code and a sample output.
Hint
Use a timer to send on schedule and not after each reply.
Medium 3: Read a result (30 minutes)
Given a table of throughput, p99 and errors at six load steps (make one up with a knee), mark the knee and choose the safe level.
Done when: a table and a chosen level with a reason.
Hint
The knee is where p99 first jumps.
Hard
Hard 1: Full capacity plan (45 minutes)
A shop expects 5 times its normal load for a sale. Plan the capacity for the web, app and database tiers, including failure and release room.
Done when: a table per tier with instance counts and assumptions.
Hint
Each tier may have a different limit and different failure units.
Hard 2: Chaos experiment (45 minutes)
Write a chaos experiment for losing one cache node. Include hypothesis, measure, blast radius, stop rule and the fix if it fails.
Done when: a one-page experiment sheet.
Hint
A good hypothesis predicts a number.
Hard 3: Find the real bottleneck (50 minutes)
A test shows p99 jumping at 700 requests per second although CPU is at 40 percent. List five other resources that may be the limit, how you would check each, and the fix for each.
Done when: a five-row table of resource, check and fix.
Hint
Think of connections, threads, locks, disk and downstream calls.