Probably yes or definitely no
Day 139 of 149
π Full deep-dive with code examples
The Nightclub Bouncer Analogy
Imagine a nightclub bouncer with a list:
"Is this person on the banned list?"
Instead of checking the whole list, they have a quick mental system
Sometimes they might say "maybe on the list" when they're not
In a standard Bloom filter (with consistent hashing and only additions), they won't say "definitely not" when someone actually is in the set
Bloom Filters work like this bouncer!
Fast to check, might have false positives, and (in the standard version) no false negatives.
More precisely: in standard use (only adding items, consistent hashing, no corruption), Bloom filters are designed to avoid false negatives.
The Problem They Solve
Checking if something is in a huge set can be expensive (especially if the data lives on disk or across the network):
"Has this user already seen this article?"
"Is this email address in our database?"
"Is this URL malicious?"
Bloom filters help youβ¦