Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ioredis cluster option support? #17

Open
jskim82 opened this issue Jan 24, 2017 · 2 comments
Open

ioredis cluster option support? #17

jskim82 opened this issue Jan 24, 2017 · 2 comments

Comments

@jskim82
Copy link

jskim82 commented Jan 24, 2017

The modules I have configured are shown below.
3 aedes Node Server(port : 1883) pm2 Cluster
1 Nginx Server(port : 40379) Load Balancer
3 Redis Master(port : 41379, port : 42379, port : 43379)

Process : Aedes -> Nginx -> Redis

Case 1 : Load Balancer Direct Connect

var aedesOption = {
concurrency : 1000
, connectTimeout : 60000
, heartbeatInterval : 600000
};
aedesOption.persistence = require('aedes-persistence-redis')({port : 60379, host : '127.0.0.1'})
aedesOption.mq = require('mqemitter-redis')({port : 60379, host : '127.0.0.1'})

aedes = require('aedes')(aedesOption);

Error Log
E:\jskim\eclipse-workspace_mars\workspace_mars\aedes-sample\node_modules\bluebird\js\release\async.js:61
fn = function () { throw arg; };
^

TypeError: Cannot convert undefined or null to object
at returnSubsForClient (E:\jskim\eclipse-workspace_mars\workspace_mars\aedes-sample\node_modules\aedes-persistence-redis\persistence.js:245:24)
at returnSubs (E:\jskim\eclipse-workspace_mars\workspace_mars\aedes-sample\node_modules\aedes-persistence-redis\persistence.js:239:20)
at tryCatcher (E:\jskim\eclipse-workspace_mars\workspace_mars\aedes-sample\node_modules\bluebird\js\release\util.js:16:23)
at Promise.errorAdapter [as _rejectionHandler0] (E:\jskim\eclipse-workspace_mars\workspace_mars\aedes-sample\node_modules\bluebird\js\release\nodeify.js:35:34)
at Promise._settlePromise (E:\jskim\eclipse-workspace_mars\workspace_mars\aedes-sample\node_modules\bluebird\js\release\promise.js:564:21)
at Promise._settlePromise0 (E:\jskim\eclipse-workspace_mars\workspace_mars\aedes-sample\node_modules\bluebird\js\release\promise.js:612:10)
at Promise._settlePromises (E:\jskim\eclipse-workspace_mars\workspace_mars\aedes-sample\node_modules\bluebird\js\release\promise.js:687:18)
at Async._drainQueue (E:\jskim\eclipse-workspace_mars\workspace_mars\aedes-sample\node_modules\bluebird\js\release\async.js:133:16)
at Async._drainQueues (E:\jskim\eclipse-workspace_mars\workspace_mars\aedes-sample\node_modules\bluebird\js\release\async.js:143:10)
at Immediate.Async.drainQueues (E:\jskim\eclipse-workspace_mars\workspace_mars\aedes-sample\node_modules\bluebird\js\release\async.js:17:14)
at runCallback (timers.js:637:20)
at tryOnImmediate (timers.js:610:5)
at processImmediate [as _immediateCallback] (timers.js:582:5)

  • result : Aedes 1883 Tcp connection succeeded but not redis db creation

Case 2 : Cluster Connect

var aedesOption = {
concurrency : 1000
, connectTimeout : 60000
, heartbeatInterval : 600000
};
aedesOption.persistence = require('aedes-persistence-redis')
([
{ port : 61379, host : '127.0.0.1' }
, { port : 62379, host : '127.0.0.1' }
, { port : 63379, host : '127.0.0.1' }
])
aedesOption.mq = require('mqemitter-redis')
([
{ port : 61379, host : '127.0.0.1' }
, { port : 62379, host : '127.0.0.1' }
, { port : 63379, host : '127.0.0.1' }
])

aedes = require('aedes')(aedesOption);

  • result : Aedes 1883 Tcp connection succeeded but not redis db creation
@mcollina
Copy link
Collaborator

There is an open PR about that in #6. It's not finished yet, and this codebase is in a moment of shift.
See also #10.

@jskim82
Copy link
Author

jskim82 commented Jan 25, 2017

Thx ^.^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants