News for hackers. Stuff that matters.
Re:Realtime Metrics for 128 Million Users with Redis: 50ms +... by firefoxman1 on Saturday March 24, 2012 @01:46PM (#3750020)
Wow, that's almost exactly how I implemented it:

   var bucketSize = 8190;

   ...

   var bucketNumber = Math.floor(userId / bucketSize),
       bitInBucket = userId % bucketSize;

...correction on my last comment, looks like I use ~8 thousand bits per bucket, not 8 million.

There are no comments on this comment yet.