Grokking Redis
0% completed
5.7 Unique Counts and Daily Activity
Counting events takes one command: INCR adds one to a counter. Counting distinct people is harder, because the same user must not be counted twice, and an exact answer needs memory in proportion to the number of users. Redis offers two compact structures for this. HyperLogLog gives an approximate count of distinct items in at most 12 KB, whatever the count. Bitmaps record exact activity at one bit per user, and combining the bitmaps of several days answers retention and streak questions.
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%