Skip to content

Commit

Permalink
docs: Document enableTLSForSentinelMode Option (#1448)
Browse files Browse the repository at this point in the history
Add to the sentinel section of the readme.  Without this option, encrypted versions of redis sentinel fail with obscure errors

Co-authored-by: peter <peter@xwin32.com>
  • Loading branch information
cintolas and peter committed Oct 22, 2021
1 parent cfb470d commit 77ad094
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,7 @@ The arguments passed to the constructor are different from the ones you use to c
- `sentinels` are a list of sentinels to connect to. The list does not need to enumerate all your sentinel instances, but a few so that if one is down the client will try the next one.
- `role` (optional) with a value of `slave` will return a random slave from the Sentinel group.
- `preferredSlaves` (optional) can be used to prefer a particular slave or set of slaves based on priority. It accepts a function or array.
- `enableTLSForSentinelMode` (optional) set to true if connecting to sentinel instances that are encrypted

ioredis **guarantees** that the node you connected to is always a master even after a failover. When a failover happens, instead of trying to reconnect to the failed node (which will be demoted to slave when it's available again), ioredis will ask sentinels for the new master node and connect to it. All commands sent during the failover are queued and will be executed when the new connection is established so that none of the commands will be lost.

Expand Down

0 comments on commit 77ad094

Please sign in to comment.