Learn the vocabulary of a probabilistic set-membership structure that also supports deleting items safely.
0 / 5 completed
1 / 5
A teammate describes a probabilistic set-membership structure that, unlike a classic Bloom filter, also supports deleting an item later by relocating fingerprints between one of two candidate buckets. What data structure is being described?
A cuckoo filter is exactly this: it stores a small fingerprint of each item in one of two candidate buckets, relocating existing fingerprints cuckoo-style when a bucket is full, and because each item's fingerprint is stored explicitly, it can be removed later, unlike a classic Bloom filter which cannot support deletion. A hash collision is an unrelated hash-table concept about two keys sharing a bucket. This fingerprint-plus-relocation approach is exactly why cuckoo filters are chosen when set membership must be probabilistic but also support removals.
2 / 5
During a design review, the team adopts a cuckoo filter for a cache admission policy that must both check whether a key was recently seen and later evict that key's membership entry as it ages out. Which capability does this provide?
A cuckoo filter here provides space-efficient probabilistic membership testing with support for deletion, since fingerprints can be relocated on insert and explicitly removed later once a key ages out. A classic Bloom filter cannot safely support removal, because clearing a bit shared by another item's hash would create false negatives for that other item. This delete-capable-fingerprint behavior is exactly why cuckoo filters are favored over Bloom filters when membership entries must expire.
3 / 5
In a code review, a dev notices a cache admission check uses a classic Bloom filter and then clears individual bits directly whenever a tracked key expires, hoping to simulate deletion. What does this represent?
This is a misuse of Bloom filters, since clearing shared bits directly can produce false negatives for other keys, whereas a cuckoo filter supports safe deletion via fingerprint relocation. A cache eviction policy is an unrelated concept about discarded cache entries. This bit-clearing-to-fake-deletion pattern is exactly the kind of correctness risk a reviewer flags once removable membership entries are required.
4 / 5
An incident report shows the cache admission check started reporting false negatives for still-valid keys after individual bits were cleared in a Bloom filter to simulate expiring older keys, because those bits were shared with the still-valid keys' hashes. What practice would prevent this?
Replacing the Bloom filter with a cuckoo filter lets expiring a key remove only its own fingerprint via relocation without corrupting other keys' membership. Continuing to clear individual Bloom filter bits directly regardless of how many other keys share those bits is exactly what caused the false negatives described in this incident. This fingerprint-based-deletion approach is the standard fix once safe removal of individual entries is confirmed to be required.
5 / 5
During a PR review, a teammate asks why the team reaches for a cuckoo filter instead of a classic Bloom filter, given that Bloom filters are more widely known and slightly simpler to implement. What is the reasoning?
A cuckoo filter trades a small amount of implementation complexity around fingerprint relocation for native support of safe deletion, while a Bloom filter is simpler but can never safely remove an individual item once inserted. This is exactly why a cuckoo filter is favored when set membership entries must expire or be removed, while a Bloom filter remains acceptable for append-only membership checks that never need deletion.