Skip to content
Theory · Top-K and counters · lesson 6 of 11

Counting with a known error

Counting views exactly for every video means keeping hundreds of millions of counters and changing them a million times a second. That fits one machine neither in memory nor in speed. There are two ways out: split the exact counters between machines by video, or count approximately, with a small error known in advance.

In this lesson

  • Why not one machine
  • Two stages
  • Approximate counting: Count-Min Sketch
  • Which to choose
  • Common mistake
  • Key points