Part 9 of 9 · 4 min read
Exercises
Easy
Easy 1: Name the goal (15 minutes)
For each, say whether it serves reliability, scalability or maintainability: (a) adding a second database copy, (b) writing a clear guide for new engineers, (c) putting a content delivery network in front of images, (d) a rule that every change can be rolled back in one step, (e) splitting a huge table across several machines.
Done when: five answers, each with one reason.
Hint
Ask "is this about surviving faults, handling growth, or easing future work?".
Easy 2: Fault or failure? (15 minutes)
Classify each as a fault, a failure, or both: (a) one of three servers loses power but users notice nothing, (b) all three servers lose power, (c) a bug returns wrong prices for one product for an hour, (d) a typo in a setting takes the site down for ten minutes.
Done when: four answers, each with one reason.
Hint
A fault becomes a failure only when users get a worse result than promised.
Easy 3: Median and average (15 minutes)
Response times in milliseconds are 50, 60, 60, 70, 70, 80, 90, 100, 120, 900. Work out the average and the median.
Done when: both values, and one sentence on which one describes a typical user better.
Hint
Add the values, divide by 10 for the average. Sort, take the middle two for the median.
Medium
Medium 1: Disk failures (30 minutes)
A storage cluster has 50,000 disks, each with an MTTF of about 25 years, which is about 9,000 days. Work out the expected failures per day and per year. Then say what the team should plan for.
Done when: both figures with the arithmetic, and a two-sentence plan.
Hint
Disks divided by MTTF in days gives failures per day.
Medium 2: Slow pages (30 minutes)
Each backend call is slow 0.5 percent of the time. Work out how often a page is slow if it makes 20 calls, 100 calls and 400 calls. Use 0.995 to the power of the number of calls (a calculator is fine here).
Done when: three percentages, and one sentence on what they show about large systems.
Hint
0.995 to the power 20 is the chance all 20 are fast. One minus that is the slow share.
Medium 3: Pick the load parameters (30 minutes)
For each system, name the two load parameters that matter most: (a) a video streaming site, (b) a chat app, (c) an online store on a sale day. Give a reason for each.
Done when: three systems, two parameters each, and a reason line for each system.
Hint
Ask "what number tells me how hard the work is?".
Hard
Hard 1: Feed design on paper (45 minutes)
A social app has 2,000,000 daily active users. Assume each posts 2 times a day, reads the feed 20 times a day, and has 200 followers on average. Work out posts per second, reads per second, and deliveries per second if feeds are built at write time. Compare read-time and write-time methods. Pick one and name the one exception you would add.
Done when: three rates, a comparison with one sentence per method, a choice with a reason and a named exception.
Hint
Reads per second = 2,000,000 × 20 ÷ 86,400. Deliveries = posts per second × 200.
Hard 2: Write an SLO (40 minutes)
Choose a service, such as a payment page or a search box. Write an SLO with a median, a p99 and an availability target. Justify each number in a sentence. Say what the team should do when the target is missed.
Done when: three targets with reasons, and a short response plan.
Hint
Use "99 out of 100 under N ms" for the percentile target.
Hard 3: Audit a design for the three goals (45 minutes)
A shop runs on one server with one database and no monitoring, and only one person knows how to deploy. Write a table listing one reliability risk, one scalability risk and one maintainability risk for each of the three parts: server, database and team. Propose one change per risk.
Done when: nine risks and nine changes, and a ranking of the top three changes by value.
Hint
One person knowing how to deploy is a maintainability risk and a reliability risk at once.