Quick Start
Launch RedisBloom with Docker
docker run -p 6379:6379 --name redis-redisbloom redislabs/rebloom:latest
Launch RedisBloom with Docker
docker run -p 6379:6379 --name redis-redisbloom redislabs/rebloom:latest
Running
# Assuming you have a redis build from the unstable branch:
/path/to/redis-server --loadmodule ./redisbloom.so
Configuration
RedisBloom has a few run-time configuration settings that must be chosen when the module is loaded.
In general, configuration options are passed by attaching arguments following the —load-module argument in the command line, the load module configuration directive in a Redis config file, or the loadmodule configuration directive in a Redis config file or the MODULE LOAD command. For example:
In redis.conf:
loadmodule redisbloom.so OPT1 OPT2
From redis-cli:
127.0.0.6379> MODULE load redisbloom.so OPT1 OPT2
From command line:
$ redis-server --loadmodule ./redisbloom.so OPT1 OPT2
Error rate and Initial Size for Bloom Filter
When loading the module, use the ERROR RATE and INITIAL SIZE arguments to change the default error ratio and initial filter size (for bloom filters), respectively e.g.
$ redis-server --loadmodule /path/to/redisbloom.so INITIAL_SIZE 400 ERROR_RATE 0.004
The default error rate is 0.01, and the initial default capacity is 100.
Initial Size for Cuckoo Filter
For the Cuckoo filter, the default capacity is 1024.
Must Read Stack Operations
Commands
The HyperLogLog is a single Probabilistic Data Structure (PDS) in Redis that is used to count different elements in a multiset. RedisBloom extends Redis with five new PDS.
- Bloom Filter -Check if items in a set are members.
- Cuckoo Filter -check if elements in a set are members.
- Count-Min Sketch - Count the number of times each element appears in a stream.
- TopK - keep track of the most common K items in a stream.
Here is the list of some commands to access the APIs, but more details can be found in the official documentation.
Bloom Filter Commands

source
Cuckoo Filter Commands

source
Count Min Sketch Commands

source
TopK list commands

source
Frequently Asked Questions
What are data types in Redis?
Redis data types
- Strings. Strings are the most basic kind of Redis value.
- Lists. Redis Lists are simply lists of strings, sorted by insertion order.
- Sets. Redis Sets are an unordered collection of Strings.
- Hashes.
- Sorted Sets.
- Bitmaps and HyperLogLogs.
- Streams.
- Geospatial indexes.
Is Redis a cache or database?
Everyone knows Redis began as a caching database, but it has since evolved to a primary database. Many applications built today use Redis as a primary database. However, most Redis service providers support Redis as a cache, but not as a primary database.
What is Redis and Kafka?
Redis is an Enterprise Cache Broker, in-memory database, and high-performance database, whereas Kafka is an Enterprise Messaging Framework. Both have their own benefits, but they are used and implemented differently.
What is a Redis module?
Redis modules are dynamic libraries that can be loaded into Redis using the MODULE LOAD command or during startup. Redis provides a C API in the form of a single Redis module C header file.
Conclusion
So, in a nutshell, Redis is a wonderful tool to work with the support of probabilistic data structures to complete such operations in optimised time is very useful in many cases.
Check out our Coding Ninjas Studio Guided Path to learn about Data Structures and Algorithms, Competitive Programming, JavaScript, System Design, and more, Take a look at the mock test series and participate in the contests hosted by Coding Ninjas Studio if you want to improve your coding skills. If you are new to preparation and want to work for firms such as Amazon, Microsoft, Uber, and others, you should review the problems, interview experiences, and interview bundle for placement preparations.
Consider taking one of our paid courses to give yourself and your profession an edge!
Please vote for our blogs if you find them valuable and exciting.
Happy Learning!!