Skip to content

Clustering sendCommand docs #3053

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

Merged
merged 1 commit into from
Aug 13, 2025
Merged

Clustering sendCommand docs #3053

merged 1 commit into from
Aug 13, 2025

Conversation

nfriedly
Copy link
Contributor

@nfriedly nfriedly commented Aug 12, 2025

Description

We noticed that sendCommand() takes different arguments for clusters vs clients, and I wanted to document the differences. I think I got it correct, but please review closely just to be sure.

It might also be worth adding a note to the readme also, since this is a somewhat unexpected difference, what do you think?

Relates to express-rate-limit/rate-limit-redis#207 & express-rate-limit/rate-limit-redis#208


Checklist

  • Does npm test pass with this change (including linting)?
  • Is the new or changed code fully tested? (N/A)
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?

We noticed that `sendCommand()` takes different arguments for clusters vs clients, and I wanted to document the differences. I think I got it correct, but please review closely just to be sure.

It might also be worth adding a note to [the readme](https://github.com/redis/node-redis/blob/2f106324507eec905b8fe7691ba11179acdeeca7/README.md#L136-L144) also, since this is a somewhat unexpected difference, what do you think?

Relates to express-rate-limit/rate-limit-redis#207 & express-rate-limit/rate-limit-redis#208
@@ -38,6 +38,25 @@ await cluster.close();
| scripts | | Script definitions (see [Lua Scripts](./programmability.md#lua-scripts)) |
| functions | | Function definitions (see [Functions](./programmability.md#functions)) |

## Usage

Most redis commands are the same as with individual clients.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope this is true. Are there other differences that should be mentioned here?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct

Copy link
Collaborator

@nkaradzhov nkaradzhov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nfriedly, your comments are spot on. Its nice to have this explained

@@ -38,6 +38,25 @@ await cluster.close();
| scripts | | Script definitions (see [Lua Scripts](./programmability.md#lua-scripts)) |
| functions | | Function definitions (see [Functions](./programmability.md#functions)) |

## Usage

Most redis commands are the same as with individual clients.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct

@nkaradzhov nkaradzhov merged commit 746e9b1 into redis:master Aug 13, 2025
1 check passed
nfriedly added a commit to nfriedly/node-redis that referenced this pull request Aug 13, 2025
nkaradzhov pushed a commit that referenced this pull request Aug 14, 2025
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

Successfully merging this pull request may close these issues.

2 participants