You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provides ability to send arbitrary commands too all nodes in a requested group or
just a handy helper to select nodes from such a group
Supports 'all', 'masters' and 'slaves' groups exposing `call` and `callBuffer` command
semantics similar to Commander
Copy file name to clipboardexpand all lines: README.md
+37
Original file line number
Diff line number
Diff line change
@@ -664,6 +664,43 @@ but a few so that if one is unreachable the client will try the next one, and th
664
664
*`retryDelayOnClusterDown`: When a cluster is down, all commands will be rejected with the error of `CLUSTERDOWN`. If this option is a number (by default, it is 1000), the client
665
665
will resend the commands after the specified time (in ms).
666
666
667
+
### Running same operation on multiple nodes
668
+
669
+
Some operations, such as `flushdb` and `flushall`, can only be performed on a single node.
670
+
There is a helper function for this case:
671
+
672
+
```javascript
673
+
var redis =newredis.Cluster();
674
+
675
+
// groups are: all, masters and slaves
676
+
// returns object or throws an error on invalid group
0 commit comments