How do you check which modules are currently loaded on a running Redis instance, and how do you load a new module?
Short answer
You use the MODULE LIST command to see all currently loaded modules along with their versions, and load a new module either by specifying it as a startup parameter when launching the Redis server, or dynamically at runtime using the MODULE LOAD command followed by the path to…
Advertisement
AModel answer
You use the MODULE LIST command to see all currently loaded modules along with their versions, and load a new module either by specifying it as a startup parameter when launching the Redis server, or dynamically at runtime using the MODULE LOAD command followed by the path to the module's compiled file.
Example
MODULE LIST MODULE LOAD /usr/lib/redis/modules/rejson.so
Real-world example
A database administrator checks MODULE LIST to confirm the RedisJSON module is properly loaded before deploying an application that depends on its specific JSON commands.
Likely follow-ups
- What happens if your application tries to use a module command before that module is actually loaded?
- Can modules be unloaded without restarting the Redis server?
Related topics