{"id":46159,"library":"redis-sentinel","title":"node-redis-sentinel","description":"Wrapper around node_redis that creates a Redis client pointing to the master server in a Sentinel-managed setup, with automatic failover when the master goes down. Version 0.3.3 is the latest, with no active releases since 2013. It differs from alternatives like ioredis in that it only supports basic failover and does not handle sentinel reconnection or advanced configurations. The library is deprecated; users should migrate to ioredis or redis with native sentinel support.","status":"deprecated","version":"0.3.3","language":"javascript","source_language":"en","source_url":"git://github.com/ortoo/node-redis-sentinel","tags":["javascript","redis"],"install":[{"cmd":"npm install redis-sentinel","lang":"bash","label":"npm"},{"cmd":"yarn add redis-sentinel","lang":"bash","label":"yarn"},{"cmd":"pnpm add redis-sentinel","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; the library wraps node_redis (redis npm package).","package":"redis","optional":false}],"imports":[{"note":"CommonJS only; no ESM support.","wrong":"import sentinel from 'redis-sentinel';","symbol":"default","correct":"const sentinel = require('redis-sentinel');"},{"note":"Factory function, not a class. Must require it.","wrong":"import { Sentinel } from 'redis-sentinel';","symbol":"Sentinel","correct":"const Sentinel = require('redis-sentinel').Sentinel;"},{"note":"Arguments are positional, not a single options object.","wrong":"const client = require('redis-sentinel').createClient({ endpoints, masterName });","symbol":"createClient","correct":"const client = require('redis-sentinel').createClient(endpoints, masterName, opts);"}],"quickstart":{"code":"const sentinel = require('redis-sentinel');\nconst endpoints = [\n  { host: '127.0.0.1', port: 26379 },\n  { host: '127.0.0.1', port: 26380 }\n];\nconst opts = { retry_max_delay: 5000 };\nconst masterName = 'mymaster';\nconst client = sentinel.createClient(endpoints, masterName, opts);\nclient.set('key', 'value', (err, reply) => {\n  if (err) console.error(err);\n  else console.log('Set:', reply);\n});\nclient.get('key', (err, value) => {\n  if (err) console.error(err);\n  else console.log('Got:', value);\n});","lang":"javascript","description":"Creates a Redis client managed by Sentinel, demonstrating basic set and get operations with automatic failover."},"warnings":[{"fix":"Replace with ioredis or redis@4.","message":"Library is deprecated; no active maintenance. Use ioredis or redis@4+ with native sentinel support.","severity":"deprecated","affected_versions":">=0.1.0"},{"fix":"Implement custom sentinel reconnection logic or use a more robust client.","message":"The library does not handle sentinel reconnection; if all sentinels go down, the client will not recover.","severity":"gotcha","affected_versions":"all"},{"fix":"Always explicitly pass the masterName.","message":"The masterName defaults to 'mymaster' if not provided; this may conflict with actual sentinel configurations.","severity":"gotcha","affected_versions":"all"},{"fix":"Install redis@0.12.1 or migrate to another library.","message":"Requires node_redis (redis package) version 0.x; incompatible with redis@2.x and later.","severity":"breaking","affected_versions":"all"},{"fix":"Use const Sentinel = require('redis-sentinel').Sentinel(endpoints); then Sentinel.createClient().","message":"The Sentinel factory function must be called with endpoints before creating clients; it's not a constructor.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.3.3':34 '2013':43 'activ':40 'advanc':64 'altern':47 'around':6 'automat':26 'basic':55 'client':13 'configur':65 'creat':10 'deprec':69 'differ':45 'failov':27,56 'goe':31 'handl':60 'ioredi':49,74 'javascript':81 'latest':37 'librari':67 'like':48 'manag':23 'master':17,30 'migrat':72 'nativ':78 'node':2,7 'node-redis-sentinel':1 'point':14 'reconnect':62 'redi':3,8,12,76,82 'releas':41 'sentinel':4,22,61,79 'sentinel-manag':21 'server':18 'setup':24 'sinc':42 'support':54,80 'user':70 'version':33 'wrapper':5","created_at":"2026-06-07T12:58:34.759279+00:00","updated_at":"2026-06-07T12:58:34.759279+00:00","problems":[{"fix":"Use a different client that supports sentinel auth (e.g., ioredis).","cause":"Library does not support authentication (AUTH) in sentinel mode.","error":"ERR invalid password"},{"fix":"Check sentinel endpoints and masterName; ensure at least one sentinel is reachable and has a master.","cause":"All sentinels return no master or are unreachable; client fails to connect.","error":"Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED"},{"fix":"Ensure 'redis' and 'redis-sentinel' are installed: npm install redis@0.12.1 redis-sentinel.","cause":"Incorrect import or require path; or missing redis dependency.","error":"TypeError: Cannot read property 'createClient' of undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/ortoo/node-redis-sentinel","github":"git://github.com/ortoo/node-redis-sentinel","docs":null,"changelog":null,"pypi":null,"npm":"redis-sentinel","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}