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

Support for cluster mode #57

Open
quixote15 opened this issue Jan 9, 2023 · 2 comments
Open

Support for cluster mode #57

quixote15 opened this issue Jan 9, 2023 · 2 comments

Comments

@quixote15
Copy link

Since this package is a wraper for node-redis is it possible to config a module in cluster mode?

The node-redis docs have this example:

Connecting to a cluster is a bit different. Create the client by specifying some (or all) of the nodes in your cluster and then use it like a regular client instance:

import { createCluster } from 'redis';

const cluster = createCluster({
  rootNodes: [
    {
      url: 'redis://10.0.0.1:30001'
    },
    {
      url: 'redis://10.0.0.2:30002'
    }
  ]
});

cluster.on('error', (err) => console.log('Redis Cluster Error', err));

await cluster.connect();

await cluster.set('key', 'value');
const value = await cluster.get('key');

Is it possible to do that ? If not, is it possible to add support for this in the lib?

@andrenjdev
Copy link

andrenjdev commented Mar 4, 2023

Hi @quixote15, Did you solve it?
I need to switch to redis on elastic cache and I'm already using this package but I can't found any solution!

@xiaoqiang1999
Copy link

@andrenjdev @quixote15
You can use this module: https://github.com/node-cache-manager/node-cache-manager-ioredis-yet
It is officially provided by node-cache-manager, in addition to the version of node-redis: https://github.com/node-cache-manager/node-cache-manager-redis-yet

可以使用此模块:https://github.com/node-cache-manager/node-cache-manager-ioredis-yet
它是node-cache-manager官方提供的,除此之外,还有node-redis的版本:https://github.com/node-cache-manager/node-cache-manager-redis-yet

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

No branches or pull requests

3 participants