Part 8 of 8 · 3 min read
Exercises
Easy
Easy 1: Pick the storage (20 minutes)
Choose block, file or object storage for: a database data disk, product photos for a shop, a shared folder for a team, a nightly backup archive, video files for streaming.
Done when: five choices, each with one reason.
Hint
Ask whether the item is changed in place, shared, or read as a whole.
Easy 2: Count the chunks (20 minutes)
A file of 350 MB is cut into 4 MB chunks. How many chunks? A user edits the file and 5 chunks change. How many MB does delta sync upload and what share is saved?
Done when: a chunk count, an upload size and a saving in percent.
Hint
Chunks = size ÷ chunk size, rounded up.
Easy 3: Replication or erasure coding (20 minutes)
Compute the raw storage for 4 PB with three copies, with erasure coding 6 + 3 and with 10 + 4. Say how many pieces each survives losing.
Done when: three raw sizes and three loss tolerances.
Hint
Overhead for k + m coding is (k + m) ÷ k.
Medium
Medium 1: Dedup saving (30 minutes)
A company has 2,000 employees, each with the same 800 MB software package on their drive, plus 3 GB of their own files. Compute the stored size without deduplication and with it. State one privacy effect.
Done when: two sizes and a risk with a protection.
Hint
Unique data once plus the package once, against 2,000 copies.
Medium 2: Upload through servers or not (30 minutes)
A video site gets 200 uploads a minute of 250 MB. Compute the bandwidth the application servers need if the data passes through them, and with pre-signed URLs. State how many servers of 2 Gbit/s you would need in the first case.
Done when: two bandwidth figures in Gbit/s, and a server count.
Hint
MB per minute to Gbit/s: ÷ 60 for per second, × 8 for bits, ÷ 1000 for Gbit.
Medium 3: Metadata size (30 minutes)
A file service has 30 million daily users, each creating 3 files of 1 MB. Each file needs one file row, one version row and one chunk row of 150 bytes each. Compute the metadata per day and per year, and its share of the data per day.
Done when: two metadata sizes, a data size and a percentage.
Hint
Rows per day × 150 bytes.
Hard
Hard 1: Design the upload flow (45 minutes)
Draw the upload of a 1 GB file with chunks of 8 MB, with status values pending and uploaded, resumable uploads, and a clean-up job for orphans. Show what happens if the client dies after 60 chunks and what the user sees on the other device.
Done when: a numbered flow, a state diagram of the file status, and the recovery steps.
Hint
Status moves from pending to uploaded only when every chunk is confirmed.
Hard 2: Durability budget (45 minutes)
A store holds 50 billion objects. Each has an annual loss chance of 10⁻¹¹ under the vendor claim. Compute the expected losses per year. A disk fails each day, and a repair takes 6 hours. Explain why overlapping failures matter, and propose how erasure coding 10 + 4 across racks changes the risk.
Done when: an expected-loss number, an explanation of overlap and a placement plan.
Hint
Expected losses = objects × chance per object.
Hard 3: Cost plan (50 minutes)
A photo service holds 40 PB. 70 percent has not been read in 6 months, 20 percent is read monthly, and 10 percent daily. Prices per GB-month (made up): hot 0.023, infrequent 0.0125, archive 0.004. Compute the monthly cost with everything hot, and with a lifecycle plan. List two risks of the plan, including retrieval charges and delays.
Done when: two monthly costs, a saving in percent and two risks with guards.
Hint
1 PB = 1,000,000 GB.