internalsGet Pro

System Design · Module 16

Analytics and counting at scale

Lessons
14
Free
0
Reading
~5 h

Your progress

0 / 14 lessons done

Sign in to track

Lessons

  1. Large-scale counting: why it gets hardAnalytics counters often share infrastructure with customer requests. Understanding their write paths helps you keep reporting useful without slowing the product or silently changing what a count means.19 min
  2. View counting: accuracy vs speedProduct badges and seller reports can use the same events but need different freshness. Counting them safely means separating what happened, what was accepted, and what the screen currently shows.18 min
  3. Impression counting for adsAd counts affect advertiser spending and seller trust. You need to explain what was measured, prevent duplicate contributions and preserve enough evidence to investigate disagreements.18 min
  4. Raw events vs pre-aggregated metricsDashboards need fast answers, but investigations need details. The data you discard determines which questions you can answer later and which mistakes you can repair.19 min
  5. Time-window aggregation: per-minute, hourly and daily countsSales dashboards and operational reports group events by time. Their answers depend on timestamp choice, late-data rules and how corrections reach stored totals.19 min
  6. HyperLogLog: estimating unique counts with little memoryDistinct-customer dashboards can consume more memory than ordinary counters. HyperLogLog lets you estimate large audiences with bounded state, provided you accept its accuracy and query limits.20 min
  7. Count-min sketch: approximate frequency countsHigh-volume analytics often needs approximate frequencies without a counter entry for every distinct key. A count-min sketch bounds that memory, but its error depends on total traffic rather than an individual item’s count.20 min
  8. Top-k: finding the most frequent itemsPopular-product lists and traffic dashboards need item identities, not just frequency estimates. Their correctness depends on candidate selection, memory limits and how counts are combined.20 min
  9. Reservoir sampling: unbiased samples from a streamYou often need examples from a stream that is too large to retain in memory. Reservoir sampling bounds the sample size without requiring the final event count.19 min
  10. t-digest: accurate percentiles with little memoryLatency dashboards need distribution information without retaining every measurement in memory. Understanding t-digest helps you choose its settings and avoid treating an estimate as a guarantee.20 min
  11. Streaming percentiles: p95 and p99 in real timeLatency dashboards can hide slow customers even when every calculation looks reasonable. You need to preserve the right distribution, time window and measurement population before p95 or p99 can guide an operational decision.19 min
  12. Mergeable sketches: combining results across serversAnalytics workers often summarize different parts of the same dataset. Combining those summaries correctly requires both a valid merge operation and a precise record of what each worker processed.19 min
  13. OLTP vs OLAP: transactional vs analytical workloadsA report can slow checkout without changing a single order. Understanding workload differences helps you protect customer requests without building an unnecessary data platform.18 min
  14. Design: an ad click aggregatorProduct analytics often become evidence for business decisions. You need to explain not only how quickly a count updates, but also what it counts, how it survives failures, and how it can be corrected.30 min

Practise with

Terms this module teaches 32

Open glossary

Ad impression

A measured ad-delivery event at a specified counting boundary, commonly beginning to render. It does not by itself establish viewability or billing eligibility.