How Bloom filters work

To complement the previous explanation, Bloom filters have been used within Redis for years through client-side libraries which took advantage of GETBIT and SETBIT to work with a bit field in a key.

Since ssali Redis 4.0 the RedisBloom module is active, this has helped any implementation overload of the Bloom filter.

within the RedisBloom documentation they give an example of a case for a Bloom filter where they tell you to look for a name of an already used user, on a small scale it is not a problem but when the service grows this can bring more work to the database data.

example:

BF.ADD user names funnyfred
(integer) 1
BF.ADD username fredisfunny
(integer) 1
BF.ADD username fred
(integer) 1
BF.ADD user names funfred
(integer) 1

Now a test is run vs the Bloom filter:

BF.EXISTS username fred
(integer) 1
BF.EXISTS username fred_is_funny
(integer) 0