System design lab

Bloom filter

Add words to a bit array, check membership, and watch false positives appear as it fills.

InteractiveThe Bloom filter on an SSTable
Loading interactive…

Each SSTable has one. A key whose bits aren't all set is definitely absent, so the read skips that file. Fill the filter and probe absent names: false positives cost one wasted file read, but a false negative — skipping a file that has the key — can never happen.

Learn the concept

The lesson this lab comes from, with the explanation, a practice task and a quiz.

More labs

All labs