How do I tell StackExchange.Redis (v1.0.481) that it's about to connect to a Redis cluster (v3.2.6, in case it matters), and not just a standalone/replicated instance? When I use the redis-cli for example, I have to pass a -c flag to make it cluster-aware. Is there an equivalent flag in the StackExchange.Redis connection string?
I've searched for and come across several examples of connection strings that include multiple comma-separated host:port parameters, but nothing that explicitly makes StackExchange.Redis cluster-aware.
Thanks.
If you have a cluster, you will connect to the cluster no matter if you put one or more endpoints on the connection string. There is no flag to connect to a cluster.
Putting more than one endpoint on your connection string is good for High Availability, so if one of the nodes is down, you'll be able to start the connection to other node.
The internal list of nodes is updated and expanded automatically. You don't need to put all the endpoints on the connection string.
Check this issue for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With