New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Big Data Cardinality: fast unique visitor counting for large instances using HyperLogLog #6212
Comments
I also heard of Bloom filters doing good job: https://en.wikipedia.org/wiki/Bloom_filter |
According to the second article, bloom filters will take up more space (though provide more accuracy) and the results cannot be merged so the process cannot be done in parallel across several machines. |
btw there is now HyperLogLog data structure in Redis http://antirez.com/news/75 update 2021simple explanation of how it works https://stackoverflow.com/a/12734343/3759928 also from https://segment.com/blog/scaling-up-reporting-on-high-cardinality-metrics/
|
Apparently possible to implement hyperloglog in pure SQL: https://www.periscope.io/blog/hyperloglog-in-pure-sql.html |
We recently ran some tests with hyperloglog in matomo to use instead of Details about the test:
Test results:
Conclusions:
All of this depends on whether large users would want exact numbers or a close enough estimate, but it might make Matomo usable for very high traffic websites. |
Great findings @diosmosis 💯 From UI perspective when enabling this the biggest challenge will be making it clear to users when accurate numbers are used and when estimates. So if someone was to enable these estimates, then we'd need to change the metric/column name to "Estimated Unique Visitors" and update the description to mention the estimate and it's error rate etc to prevent users getting confused or reporting errors that aggregating the unique visitors from lower periods isn't the same etc. |
HyperLogLog is an algorithm that provides 97% accuracy on cardinality counts (ie, unique visitors), while using a very small memory footprint. We could add support for this algorithm within Piwik to not only provide fast cardinality for large numbers of visits, but also we can use it to provide a unique visitor count for any period. HyperLogLog results can themselves be aggregated, so they can be stored in archive tables as blobs.
More info:
The text was updated successfully, but these errors were encountered: