FjellSystem Design Lab
Chapter 15 checkpoint

Chapter 15 checkpoint: sales rank by category

Every question from this chapter’s lessons. Your first answer to each is the one that counts; afterward you can practice again as often as you like. Passing needs 75% right on the first attempt.

0 of 17 answered0 right on the first attempt
Question 1 of 17
The service receives 1 billion purchase transactions a month. In a 30-day month, how many transactions per second is that on average?
TPS

Answers within 5% count.

Question 2 of 17
Each transaction log line is about 40 bytes, and there are 1 billion a month. How much new data is that per month, in GB?

Answers within 5% count, in any unit you choose.

Question 3 of 17
Using 400 requests per second ≈ 1 billion a month, how many reads per second do 100 billion reads a month average out to?
reads/s

Answers within 5% count.

Question 4 of 17
The ranking itself, the top 1,000 products in each of 1,000 categories, is only a million rows. So what is actually hard about this feature?

Question 5 of 17
Why does recomputing the ranking from the raw log in an hourly batch job give trustworthy results?

Question 6 of 17
Match each stream-processing term to its meaning.

Question 7 of 17
The streaming counts for a window are a little lower than the hourly batch recount of the same window. What is the likely cause?

Question 8 of 17
Purchases are weighted by e−λ⋅agee^{-\lambda \cdot \text{age}} with a half-life of 24 hours. How much does a sale from 48 hours ago count?

Answers within 2% count.

Question 9 of 17
In Kreps’s Kappa architecture, how do you reprocess data after fixing a bug?

Question 10 of 17
Why do Redis sorted sets suit a continuously updated leaderboard?

Question 11 of 17
You keep the top 1,000 products for each of 10,000 categories in sorted sets. Assuming about 128 bytes per member, how much RAM is that, in GB?

Answers within 5% count, in any unit you choose.

Question 12 of 17
How does a Redis skip list decide how many levels a member’s node has?

Question 13 of 17
Match each sorted-set command to its cost, for NN members and MM returned.

Question 14 of 17
%

Question 15 of 17
A rarely viewed category gets 0.01 requests per second, with the same 60-second cache. What is its hit ratio, as a percentage?
%

Answers within 2% count.

Question 16 of 17
On a big shopping day, millions of shoppers open the Electronics ranking, and all its reads land on the one Redis node that holds it. What relieves that node?

Question 17 of 17
A hot category’s writes are split so that each shard holds partial counts for every product. The top 10 is built by merging each shard’s top 10, and sometimes it names the wrong winner. Why?