Introducing Dragonfly Cloud! Learn More

Question: What are Redis Enterprise Modules and how can they be used?

Answer

Redis Enterprise Modules extend the functionality of open-source Redis with advanced capabilities. Here's a brief overview of some commonly used modules, their purpose, and how you can use them.

  1. RediSearch: RediSearch is a real-time secondary index with a full-text search for Redis. It allows you to query your data at lightning speed. To use the RediSearch module, you can start by creating an index on your keys:
FT.CREATE myIdx ON hash PREFIX 1 "doc:" SCHEMA title TEXT WEIGHT 5.0 body TEXT url TEXT
  1. RedisJSON: RedisJSON provides native support for managing JSON values in Redis. It enables you to store, update, and fetch JSON values from Redis documents. You can set a JSON value as follows:
JSON.SET doc . '{"name":"John", "age":30, "city":"New York"}'
  1. RedisGraph: RedisGraph is a graph database in Redis. It uses linear algebra and matrix multiplication to process data for graph queries. You can create a graph as follows:
GRAPH.QUERY myGraph "CREATE (:person {name:'John Doe'})"
  1. RedisTimeSeries: RedisTimeSeries is a time-series data structure for Redis that supports high volume inserts and can query ranges in a very efficient manner. You can add data to a time series using:
TS.ADD temperature:2:32 1548149181 26 LABELS sensor_id 2 area_id 32

Before using any of these modules, you'd need to have them loaded into your Redis Enterprise cluster, which typically involves specifying the path to the module during the setup or configuration of your Redis server. Please refer to the official documentation for detailed instructions.

Was this content helpful?

White Paper

Free System Design on AWS E-Book

Download this early release of O'Reilly's latest cloud infrastructure e-book: System Design on AWS.

Free System Design on AWS E-Book

Start building today 

Dragonfly is fully compatible with the Redis ecosystem and requires no code changes to implement.