Description
Issue Description
It appears that Parse Server doesn't support redis-sentinel URLs for Live Query. When passing in a redis-sentinel url, the underlying redis module throws an exception
Steps to reproduce
- Put a redis-sentinel URI in ParseServer's liveQuery block's redisURL
- Put the same redis-sentinel URI in the options for createLiveQueryServer
var api = new ParseServer({
...
liveQuery: {
classNames: ['Foo','Bar'],
redisURL: 'redis-sentinel://redis0.rs.local:6379,redis1.rs.local:6379,redis2.rs.local:6379'
}
});
ParseServer.createLiveQueryServer(httpServer, {
...
redisURL: 'redis-sentinel://redis0.rs.local:6379,redis1.rs.local:6379,redis2.rs.local:6379'
});
Expected Results
I was hoping that Parse Server would be able to support Redis Sentinel URIs as it allows for automatic failover in production environments. Similiar to how it can accept the MongoDB URI of a replica set
Actual Outcome
The below exception was thrown instead when passing in the redisURL: redis-sentinel://redis0.rs.local:6379,redis1.rs.local:6379,redis2.rs.local:6379
node_redis: WARNING: You passed "redis-sentinel" as protocol instead of the "redis" protocol!
node_redis: WARNING: You passed "redis-sentinel" as protocol instead of the "redis" protocol!
/opt/parseserver/node_modules/parse-server/lib/ParseServer.js:218
throw err;
^
ReplyError: ERR invalid DB index
at parseError (/opt/parseserver/node_modules/redis-parser/lib/parser.js:193:12)
at parseType (/opt/parseserver/node_modules/redis-parser/lib/parser.js:303:14)
Environment Setup
-
Server
- parse-server version: 2.7.1
- Operating System: Ubuntu 16.04
- Hardware: n/a
- Localhost or remote server?: GCP Compute Instance
-
Database
- MongoDB version: n/a
- Storage engine: n/a
- Hardware: n/a
- Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): n/a
Logs/Trace
node_redis: WARNING: You passed "redis-sentinel" as protocol instead of the "redis" protocol!
node_redis: WARNING: You passed "redis-sentinel" as protocol instead of the "redis" protocol!
/opt/parseserver/node_modules/parse-server/lib/ParseServer.js:218
throw err;
^
ReplyError: ERR invalid DB index
at parseError (/opt/parseserver/node_modules/redis-parser/lib/parser.js:193:12)
at parseType (/opt/parseserver/node_modules/redis-parser/lib/parser.js:303:14)