See Redis class.
Hostnames will be resolved to IP addresses via this function. This is needed when the addresses of startup nodes are hostnames instead of IPs.
You may provide a custom lookup
function when you want to customize
the cache behavior of the default function.
See Redis class.
See Redis class.
When enabled, ioredis only emits "ready" event when CLUSTER INFO
command reporting the cluster is ready for handling commands.
By default, When a new Cluster instance is created,
it will connect to the Redis cluster automatically.
If you want to keep the instance disconnected until the first command is called,
set this option to true
.
When a MOVED or ASK error is received, client will redirect the command to another node. This option limits the max redirections allowed to send a command.
Passed to the constructor of Redis
SRV records will be resolved via this function.
You may provide a custom resolveSrv
function when you want to customize
the cache behavior of the default function.
When a CLUSTERDOWN error is received, client will retry
if retryDelayOnClusterDown
is valid delay time (in ms).
When an error is received when sending a command (e.g.
"Connection is closed." when the target Redis node is down), client will retry
if retryDelayOnFailover
is valid delay time (in ms).
By default, this value is 0, which means when a MOVED
error is received,
the client will resend the command instantly to the node returned together with
the MOVED
error. However, sometimes it takes time for a cluster to become
state stabilized after a failover, so adding a delay before resending can
prevent a ping pong effect.
When a TRYAGAIN error is received, client will retry
if retryDelayOnTryAgain
is valid delay time (in ms).
Scale reads to the node with the specified role.
Custom LUA commands
The milliseconds between every automatic slots refresh.
The milliseconds before a timeout occurs while refreshing slots from the cluster.
Discover nodes using SRV records
See "Quick Start" section.
Generated using TypeDoc
Options for Cluster constructor