NEW
A space-efficient probabilistic data structure for set membership tests allowing false positives but no false negatives.
DESCRIPTION
A Bloom filter uses multiple hash functions to set bits in a fixed-size bit array. Querying tests whether all corresponding bits are set, indicating possible membership. It trades exactness for memory efficiency and speed, yielding no false negatives and controllable false positive rates. Applications include cache lookups, database indexing, and network routing.
ALTERNATIVE DEFINITIONS
Wikipedia
A Bloom filter is a space-efficient probabilistic data structure that is used to test whether an element is a member of a set; false positive matches are possible, but false negatives are not.
Captures probabilistic nature and error asymmetry.
Cloudflare
A Bloom filter is a probabilistic data structure that efficiently tests whether an element is in a set, allowing false positives but no false negatives.
Highlights efficiency and one-sided error in practical engineering terms.
RELATED TERMS
Probabilistic Data Structure Hashing Set Membership Type I Error
COMPETING TERMS
Cuckoo Filter Xor Filter
RELATIONS
- Broader: Filter
KNOWLEDGE AREAS
Data Engineering Mathematics Software Engineering Data Storage & Operations
TARGET AUDIENCE
Software Developer Data Engineer Data Architect MLOps Engineer
EXTERNAL SOURCES
- Wikipedia - Bloom filter
- Apache HBase - Bloom filters in HBase storage
- Redis - RedisBloom module overview
TOP QUESTIONS
When should I use a Bloom Filter?
Use it to quickly test set membership before expensive lookups, especially when memory is constrained and occasional false positives are acceptable.
Category: Application
What are the errors of a Bloom Filter?
It has false positives but no false negatives. The false positive rate depends on filter size, number of items, and hash count.
Category: Concept
How do I tune a Bloom Filter?
Choose bit-array size and number of hash functions based on expected item count and target false positive rate using standard formulas.
Category: Best practices
What are common mistakes using Bloom Filters?
Not accounting for growth beyond capacity, using poor hash functions, and forgetting the impossibility of deletions in basic Bloom filters.
Category: Mistakes
Can Bloom Filters support deletions?
Yes with counting Bloom filters, which maintain counters instead of bits, enabling deletions at extra memory cost.
Category: Comparison
What alternatives compete with Bloom Filters?
Cuckoo filters and Xor filters often offer similar or improved performance and support features like deletions.
Category: Alternatives
Where are Bloom Filters used in databases?
They’re used to avoid unnecessary disk reads in LSM-tree systems and to accelerate join and existence checks.
Category: Example
How do Bloom Filters affect performance?
They reduce I/O and CPU by quickly filtering negatives, improving throughput and latency for read-heavy workloads.
Category: Relevancy
How to monitor Bloom Filter effectiveness?
Track hit/miss rates, false positive rate estimates, and adjust sizing or rebuild filters as datasets grow.
Category: Observability