Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bloom Filters #9

Open
ltbringer opened this issue Mar 20, 2023 · 0 comments
Open

Bloom Filters #9

ltbringer opened this issue Mar 20, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@ltbringer
Copy link
Owner

SSTables may grow as large as 100GBs. This will require a tradeoff between search using disk-seek vs loading the sstable in memory. Even after using multiple threads, it is difficult to offer high throughput when the key doesn't exist.

A Bloom Filter is a probabilistic data structure that could take a key and say one of:

  1. Maybe the key exists.
  2. The key surely doesn't exist.

In other words, there is a chance of false positives but no chance of false negatives. Here, the rate of false positives is controlled by:

$p = (1 - e^{-kn/m})^k$
Where1,

  • $p$ is the false positive rate
  • $k$ is the number of hash functions used
  • $n$ is the number of keys in the filter
  • $m$ is the size of the bit vector.

Footnotes

  1. https://en.wikipedia.org/wiki/Bloom_filter

@ltbringer ltbringer added the enhancement New feature or request label Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant