Redis has a Modules API that allows developers to extend its core functionality with new capabilities. Redis Modules are libraries that can be written in C or other languages (including Rust and Zig). Modules can add new commands and/or data structures to Redis. For example, through the addition of modules, Redis can be extended to become a Timeseries or Graph database, while retaining all of its original key/value store functionality.
Modules are loaded into the Redis server at startup by modifying the redis.conf configuration file. Application developers then make use of the extra functionality provided by a module simply by calling the module's commands in the same way they would any other Redis command. We'll see how to do this using the ioredis client for Node.js shortly.
The redis.io website has a catalog of available modules. Redis has developed a number of these that extend Redis in different ways, and we'll use some of them in our sample application.
One way to get started with Redis modules is to use the Redis Stack Docker container from Docker Hub. This is the container that you're using on this course, and it includes all of the following capabilities:
Redis offers Redis Cloud, a fully managed service for running and scaling Redis and Redis Stack. Sign up for Redis Cloud and use the full-featured free tier to try it out!
Our social checkin application uses three Redis Stack capabilities:
[email protected]
?"In the next section, we'll get to grips with Redis JSON...
Check out these links to learn more about which modules are available for Redis and how to use the modules API to create you own: