Hacker News new | ask | show | jobs
by klaussilveira 587 days ago
HyperLogLog and PostgreSQL: https://github.com/citusdata/postgresql-hll

Or even simpler, Roaring Bitmaps: https://pncnmnp.github.io/blogs/roaring-bitmaps.html

https://blog.quastor.org/p/grab-rate-limiting

https://github.com/RoaringBitmap/CRoaring

1 comments

HyperLogLog doesn't support exact counters though, does it? That seems to be one of the core requirements of the queue-based solution.
HyperLogLog (or even Count-Min Sketch) will not support some of the requirements of even the Best-Effort counter (clearing counts for specific keys, decrementing counts by any arbitrary number, having a TTL on counts etc.). For Accurate counters, we are trying to solve for multi-region read/write availability at low single-digit millisecond latency at cheap costs, using the infrastructure we already operate and deploy. There are also other requirements such as tracking the provenance of increments, which play a part.