Note
Starting with Redis 8, all RedisBloom data structures are integral to Redis. You don't need to install this module separately.
We no longer release standalone versions of RedisBloom.
Note
32 bit systems are not supported.
RedisBloom adds a set of probabilistic data structures to Redis, including Bloom filter, Cuckoo filter, Count-min sketch, Top-K, and t-digest. Using this capability, you can query streaming data without needing to store all the elements of the stream. Probabilistic data structures each answer the following questions:
- Bloom filter and Cuckoo filter:
- Did value v already appear in the data stream?
- Count-min sketch:
- How many times did value v appear in the data stream?
- Top-k:
- What are the k most frequent values in the data stream?
- t-digest:
- Which fraction of the values in the data stream are smaller than a given value?
- How many values in the data stream are smaller than a given value?
- Which value is smaller than p percent of the values in the data stream? (What is the p-percentile value?)
- What is the mean value between the p1-percentile value and the p2-percentile value?
- What is the value of the nᵗʰ smallest/largest value in the data stream? (What is the value with [reverse] rank n?)
Answering each of these questions accurately can require a huge amount of memory, but you can lower the memory requirements drastically at the cost of reduced accuracy. Each of these data structures allows you to set a controllable trade-off between accuracy and memory consumption. In addition to having a smaller memory footprint, probabilistic data structures are generally much faster than accurate algorithms.
https://redis.io/docs/latest/develop/data-types/probabilistic/
Top-K writes now replicate through the internal TOPK._ADD_SEEDED and
TOPK._INCRBY_SEEDED commands. Both primary and replicas must support these commands;
older replicas reject them and can lose writes or stop, depending on the configured
propagation error behavior. Redis core must also support internal module commands.
Pause Top-K writes while module versions differ. Upgrade replicas before the primary, and prevent failover to an upgraded node while any replica still uses the old module. After all nodes are upgraded, fully resynchronize replicas from the primary before resuming Top-K writes: this fix does not repair existing divergence.
Before rolling back the module on an AOF-enabled node, pause Top-K writes throughout
the topology, run BGREWRITEAOF on every node being downgraded, and wait for
aof_rewrite_scheduled:0, aof_rewrite_in_progress:0, and
aof_last_bgrewrite_status:ok. Keep writes paused until
rollback completes so new seeded commands cannot enter the AOF. The rewrite replaces
seeded command history with serialized state; Top-K RDB encoding remains 0. An older
module cannot load an AOF that still contains the seeded command names.
On replicas, Top-K write command statistics and latency metrics use the internal
command names, and ordinary MONITOR clients no longer see these writes. Primary
client commands keep their public names.
Starting with Redis 8, RedisBloom is licensed under your choice of: (i) Redis Source Available License 2.0 (RSALv2); (ii) the Server Side Public License v1 (SSPLv1); or (iii) the GNU Affero General Public License version 3 (AGPLv3). Please review the license folder for the full license terms and conditions. Prior versions remain subject to (i) and (ii).
By contributing code to this Redis module in any form, including sending a pull request via GitHub, a code fragment or patch via private email or public discussion groups, you agree to release your code under the terms of the Redis Software Grant and Contributor License Agreement. Please see the CONTRIBUTING.md file in this source distribution for more information. For security bugs and vulnerabilities, please see SECURITY.md.