Review cards · 21 cards

Estimation

Back-of-envelope numbers: requests per second, storage, bandwidth and the constants behind them.

Train estimation in daily review

Cards

  1. Network links are quoted in _____ per second, while file sizes are in bytes, so a 1 Gbit/s link moves at most about 125 MB/s: divide by _____. easy Fill in the blank
  2. Users publish 5,000 posts a second, and an author has 200 followers on average. With fan-out on write, how many feed-cache inserts per second does that cause? easy Estimate
  3. In a storage estimate, what sizes do you assume for a numeric id, a timestamp, a UUID and a short text field? easy Flashcard
  4. A photo app serves 50,000 image views a second at peak, and an image averages 200 KB. What outbound bandwidth does that need? easy Estimate
  5. 1,000 servers each write 50 log lines a second, and a line averages 200 bytes. How much log data is produced per day? easy Estimate
  6. 100,000 hosts each report 200 metrics every 10 seconds. How many data points per second does the ingestion tier receive? easy Estimate
  7. An app has 10 million daily active users, and each makes 20 requests a day. What is the average load in requests per second? easy Estimate
  8. A URL shortener creates 100 million new links a month, and each link is read 100 times for every time one is created. What is the average read load? easy Estimate
  9. Why work out the read-to-write ratio early in a design, and what does each answer point to? easy Flashcard
  10. What is the quick rule for turning "per day" into "per second"? easy Flashcard
  11. A 30-day month has about _____ seconds, so 100 million requests a month average about _____ requests a second. easy Fill in the blank
  12. Peak load is 60,000 requests/s. One server handles 2,000 requests/s at most, and you want each to run at no more than 60% of that. How many servers? easy Estimate
  13. About how much slower is a random 4 KB read from an SSD than a read from main memory? easy Multiple choice
  14. Users upload 500 hours of video every minute. After transcoding, all the resolutions of one hour take about 1 GB in total. How much new storage is needed per day? easy Estimate
  15. A URL shortener uses 7-character codes made of a–z, A–Z and 0–9. How many distinct codes are there? medium Estimate
  16. A service stores 500 million short links. You want to cache the hottest 20% of them, and each cache entry (key, URL and overhead) takes about 500 bytes. How much cache memory is that? medium Estimate
  17. A network round trip inside one data center takes about _____, while a round trip from California to Europe takes about _____. medium Fill in the blank
  18. Which of these takes the longest? medium Multiple choice
  19. Users write 100 million posts a day, 300 bytes each (text and metadata, no media). How much storage do five years of posts need, before replication? medium Estimate
  20. Why do large tables use 64-bit ids instead of a 32-bit integer column? medium Flashcard
  21. A service receives 5,000 requests/s, and each request takes 200 ms to answer. On average, how many requests are in progress at any moment? hard Estimate

More topics