CSE Roadmap

Core tier · about 3 hours · 9 parts

Part 9 of 9 · 3 min read

Exercises

Easy

Easy 1: Daily to per second (15 minutes)

A site has 500,000 daily active users, each sending 10 requests a day. Work out requests per second, and peak requests per second at a factor of 3.

Done when: both numbers are written with the arithmetic, using 100,000 or 86,400 for seconds in a day.

Hint

Multiply 500,000 by 10, divide by 86,400, then multiply by 3.

Easy 2: Units drill (15 minutes)

Answer: (a) How many MB is 3 GB? (b) How many KB is 2 MB? (c) How many 500 KB images fit in 1 GB? (d) How many bits are in 25 MB?

Done when: four answers, each with its unit written.

Hint

Multiply or divide by 1,000 between units. One byte is 8 bits.

Easy 3: Nines to minutes (15 minutes)

Work out the yearly downtime for 99.5 percent and for 99.95 percent availability.

Done when: two answers in hours or minutes, with the steps shown.

Hint

Downtime share is 100 minus the percentage. Multiply that share by 8,760 hours.

Medium

Medium 1: Storage for chat (30 minutes)

A chat app has 10,000,000 daily users who send 40 messages each. Each message is 100 bytes of text plus 100 bytes of extra data. Keep messages for 3 years. Work out messages per second, storage per day and storage for 3 years.

Done when: three results, assumptions written first, and a sentence saying whether the storage fits on one machine.

Hint

Messages a day ÷ 86,400 for the rate. Bytes a day × 365 × 3 for storage.

Medium 2: Latency budget (30 minutes)

A page makes 12 calls in a row inside one data centre, each taking 0.5 ms for the trip, plus 5 disk seeks of 10 ms each. Add the totals. Then show how the total changes if the 5 seeks become memory reads of 100 ns.

Done when: two totals in milliseconds, and one sentence on what the change shows.

Hint

12 × 0.5 ms and 5 × 10 ms for the first total. A 100 ns read is 0.0001 ms.

Medium 3: Read heavy or write heavy? (30 minutes)

A news site has 1,000,000 daily readers who each view 6 articles, and 50 reporters who publish 4 articles each a day. Work out reads and writes per second, the ratio between them and one design hint that the ratio suggests.

Done when: both rates, the ratio as "N to 1", and one hint with a reason.

Hint

Compare the two rates. Many reads and few writes suggests caching.

Hard

Hard 1: Estimate a video site (45 minutes)

A video site has 20,000,000 monthly users. Assume 25 percent watch daily, each watching 5 videos of 8 minutes. Assume 100,000 uploads a day, each 300 MB before processing. Estimate watch requests per second, upload storage per day, per year, and video bandwidth at 2 MB per second of video watched at once.

Done when: all figures with assumptions listed, and a closing paragraph with three "so the design needs..." sentences.

Hint

Do requests, then storage, then bandwidth, each in its own block with the unit.

Hard 2: Find the biggest number (40 minutes)

Pick a system you use daily. Estimate its requests per second, storage after 5 years and bandwidth. Say which of the three is the hardest problem for its designers and why.

Done when: three estimates with assumptions, a ranking of the three problems, and a one-line explanation of the top one.

Hint

Write assumptions first. If a number is a guess, say so.

Hard 3: Cost of a nine (40 minutes)

A shop's checkout earns 5,000 dollars an hour on average. Compute the lost income for one year at 99 percent, 99.9 percent and 99.99 percent availability. Then suppose each extra nine costs 20,000 dollars a year more to run. Say which level the shop should choose.

Done when: three loss figures, three cost figures, a comparison table and a recommendation with a reason.

Hint

Lost hours are the downtime share × 8,760. Multiply by 5,000 dollars.