My application uses the StackExchange.Redis
package and I started using the sentinel architecture in order to support high availability and failures.
I've search the web, trying to find the correct way I should use the ConnectionMultiplexer
object while using the sentinel architecture and couldn't really find a useful answer.
Some posts say that it doesn't support it yet or partially supports it, some tell you to add all your redis connection addresses to the connection string and some tell you that they provided a custom implementation by subscribing to events.
So, does the ConnectionMultiplexer
support this kind of architecture?
If the answer is yes, how should my connection string look like?
Commands. Use “redis-cli” with port 26379 to connect to sentinel. Note: you always want to tail the /var/log/sentinel/sentinel. log on all sentinels to see the cluster interaction.
StackExchange. Redis is a high performance general purpose redis client for . NET languages (C#, etc.). It is the logical successor to BookSleeve, and is the client developed-by (and used-by) Stack Exchange for busy sites like Stack Overflow.
Redis is the ConnectionMultiplexer class in the StackExchange. Redis namespace; this is the object that hides away the details of multiple servers. Because the ConnectionMultiplexer does a lot, it is designed to be shared and reused between callers. You should not create a ConnectionMultiplexer per operation.
Redis is a NoSQL key-value cache that stores the information in a hash table format, providing the possibilities to store different types of structured data like strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs.
You might be looking for this:
https://github.com/StackExchange/StackExchange.Redis/pull/406
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