question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to work with redis when cluster mode is enabled

See original GitHub issue

Description

We are using redis in cluster mode. When I test it with redis with cluster mode enabled, sendCommand functions hangs and never returns any response.

import rateLimit from "express-rate-limit";
import { createCluster } from "redis";
import RedisStore from "rate-limit-redis";

const createRateLimiter = async(({}) => {
  const cluster = createCluster({
    rootNodes: [
      {
        url: "redis://127.0.0.1:6379",
      },
    ],
  });
  await cluster.connect();

  return rateLimit({
    store: new RedisStore({
      sendCommand: (...args) => cluster.sendCommand(args),
    }),
  });
});

Library version

3.0.0

Node version

v14.16.1

Typescript version (if you are using it)

No response

Module system

CommonJS

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
krishna-unibuddycommented, Mar 31, 2022

Hi , We created custom RedisStore for the moment. This issue is still relevant. Sorry, I did not get more time to invest on this since I last worked on it.

0reactions
stale[bot]commented, May 30, 2022

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Replication: Redis (Cluster Mode Disabled) vs. Redis (Cluster ...
A Redis (cluster mode disabled) cluster always has a single shard (API/CLI: node group) with up to 5 read replica nodes. A Redis...
Read more >
Unable to access Redis (cluster mode enabled) Cluster's ...
To access data from ElastiCache for Redis nodes enabled with in-transit encryption, you use clients that work with Secure Socket Layer (SSL). ...
Read more >
Installing Redis Cluster (cluster mode enabled) with auto failover
cluster -enabled: Enables/Disables Redis Cluster support on a specific Redis node. If it is disabled, the instance starts as a stand-alone ...
Read more >
Scaling with Redis Cluster
Redis Cluster provides a way to run a Redis installation where data is automatically sharded across multiple Redis nodes. Redis Cluster also provides...
Read more >
Configure Redis clustering - Premium Azure Cache for Redis
Do I need to make any changes to my client application to use clustering? · When clustering is enabled, only database 0 is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found