Skip to content

Use Redis Sentinel#

Redis Sentinel is a component in the High Availability Management System for the Redis database. It is used to detect failures in Redis master nodes and automatically reconfigure the system to ensure continuous operation.

To use Redis Sentinel, you need to fill in the "sentinels" section from the "LIM_MANAGER_DB" and "LIM_MATCHER_DB" sections.

Also, the use of Redis Sentinel can be specified in the "LUNA_INDEXED_LIST_PLUGIN" section, which is responsible for connecting the matching plugin with Redis when calculating matching cost of the request.

Example of filling in the "LUNA_INDEXED_LIST_PLUGIN" section:

LUNA_INDEXED_LIST_PLUGIN = {"REDIS_URL": "redis+sentinel://localhost:26379,localhost:26378/indexed_matcher?username=master_username&password=master_password", "REQUEST_TIMEOUT": 60}

Here:

  • "redis+sentinel://" - Prefix indicating the use of the Redis protocol and Redis Sentinel for connection.
  • "localhost:26379,localhost:26378" - List of Sentinel addresses and ports that the service will use to detect the status of Redis master nodes and coordinate actions in case of failures.
  • "/indexed_matcher" - Path to a specific Redis database.
  • "?username=master_username&password=master_password" - Auth data.