BUILD_WITH_MODULES=yes flag.
Available Built-in Modules
When compiled withBUILD_WITH_MODULES=yes, Redis includes:
- RedisJSON - Native JSON document storage with JSONPath queries
- RediSearch - Full-text search, secondary indexing, and query engine
- RedisTimeSeries - Time-series data storage with downsampling and aggregation
- RedisBloom - Probabilistic data structures (Bloom filters, Cuckoo filters, Count-Min sketch, Top-K)
Module Structure
The built-in modules are located in themodules/ directory:
RedisJSON
Stores, updates, and queries JSON documents as native Redis data types.Features
- JSONPath syntax for querying and manipulation
- Atomic operations on JSON documents
- Integration with RediSearch for indexing
- Efficient memory representation
Example Commands
Key Commands
JSON.SET- Set JSON document or valueJSON.GET- Get JSON document or valueJSON.DEL- Delete JSON document or valueJSON.NUMINCRBY- Increment number valueJSON.ARRAPPEND- Append to arrayJSON.ARRPOP- Pop from arrayJSON.OBJKEYS- Get object keysJSON.TYPE- Get type of value
RediSearch
Provides full-text search, secondary indexes, and a query engine for Redis data.Features
- Full-text search with stemming and fuzzy matching
- Secondary indexes on hash and JSON documents
- Vector similarity search
- Geospatial queries
- Aggregations and grouping
- Phonetic matching
Example: Creating an Index
Example: JSON Index
Key Commands
FT.CREATE- Create indexFT.SEARCH- Search indexFT.AGGREGATE- Run aggregation queryFT.SUGADD- Add suggestionFT.SUGGET- Get suggestionsFT.INFO- Get index infoFT.DROPINDEX- Drop index
RedisTimeSeries
Stores and queries time-series data with automatic downsampling and aggregations.Features
- High-performance time-series data storage
- Automatic downsampling with configurable aggregations
- Retention policies
- Compaction rules
- Range queries with aggregations
- Labels for filtering and grouping
Example Commands
Key Commands
TS.CREATE- Create time seriesTS.ADD- Add sampleTS.MADD- Add multiple samplesTS.RANGE- Query rangeTS.MRANGE- Multi-series range queryTS.GET- Get latest sampleTS.MGET- Get latest from multiple seriesTS.CREATERULE- Create compaction ruleTS.INFO- Get series info
RedisBloom
Probabilistic data structures for approximate membership and counting.Bloom Filter
Tests whether an element is a member of a set with tunable false positive rate.Cuckoo Filter
Similar to Bloom filter but supports deletion.Count-Min Sketch
Estimates frequency of items in a stream.Top-K
Tracks top K most frequent items.Key Commands
Bloom Filter:BF.RESERVE- Create filterBF.ADD- Add itemBF.MADD- Add multiple itemsBF.EXISTS- Check membershipBF.MEXISTS- Check multiple
CF.RESERVE- Create filterCF.ADD- Add itemCF.EXISTS- Check membershipCF.DEL- Delete itemCF.COUNT- Count occurrences
CMS.INITBYDIM- Create sketchCMS.INCRBY- Increment counterCMS.QUERY- Query countCMS.MERGE- Merge sketches
TOPK.RESERVE- Create Top-KTOPK.ADD- Add itemsTOPK.QUERY- Query membershipTOPK.LIST- List top itemsTOPK.COUNT- Count item
Module Configuration
When running Redis with built-in modules, use theredis-full.conf configuration:
Manual Loading
You can also load modules individually:Checking Loaded Modules
Use Cases
E-commerce Application
IoT Monitoring
Social Media Analytics
Performance Considerations
Best Practices
- Use appropriate retention policies for time-series data
- Size Bloom filters correctly - balance false positive rate vs memory
- Create indexes selectively - only index fields you query
- Use downsampling for long-term time-series storage
- Monitor module memory with INFO commands
Documentation
For detailed documentation on each module:- RedisJSON Documentation
- RediSearch Documentation
- RedisTimeSeries Documentation
- RedisBloom Documentation
Next Steps
Module API Overview
Learn about the modules API
Create Custom Modules
Build your own Redis module