3 ms·
Needed to answer the question "have these 2 user IDs ever interacted?" in a 30 million user system. We did this to lower the read pressure on the primary data s
by 0xFACEFEED 7y ago
Needed to answer the question "have these 2 user IDs ever interacted?" in a 30 million user system. We did this to lower the read pressure on the primary data store. The bloom filter was basically a highly space efficient cache layer that answered one question. All of our other caches ran in large sharded clusters to distribute load and storage. A single bloom filter server was able to service all requests. Pretty cool.
If the bloom filter says yes then we check against the primary data store (there might be a false positive). If the bloom filter says no then we trust the bloom filter (there are no false negatives). It works because the vast majority of answers are "no" for this particular question.