A HyperLogLog is a probabilistic data structure used in order to count unique values. Mathematically it is defined as a probabilistic data structure to estimate the cardinality of a data set. Computing the count of distinct elements in a large data set is often necessary but computationally intensive. Say you need to calculate the number of distinct users visiting your website in the past week. Doing this with a traditional SQL query on a large data set would take a long period of time and a large amount of memory. But instead of exact count if an approximation is allowed we can achieve this in no time with a small amount of memory usage by using the HyperLogLog algorithm. In this post I’m going to give a quick introduction to Redis HyperLogLog.