Questions tagged [stackexchange.redis]

A high performance .NET redis client library

StackExchange.Redis is a high-performance redis client library for .NET and Mono applications, allowing massively concurrent usage from multiple threads (for example, on a busy web site). The library exposes synchronous, asynchronous and fire-and-forget APIs, allowing it to support a wide variety of use-cases. Additionally, the client supports internal management of connections to multiple servers, including both master/slave setups and redis "cluster". The entire set of redis functionality is included (including auto-resubscribe for pub/sub connections), with the exception of the blocking pop operations, which are not compatible with the multiplexer design.

The client was designed, created and released by the Stack Exchange development team, and is the redis client that drives the Stack Exchange Network (including Stack Overflow). It supersedes the BookSleeve client that Stack Exchange had been using previously

Links:

1108 questions
21
votes
1 answer

How does StackExchange.Redis use multiple endpoints and connections?

As explained in the StackExchange.Redis Basics documentation, you can connect to multiple Redis servers, and StackExchange.Redis will automatically determine the master/slave setup. Quoting the relevant part: A more complicated scenario might…
Gigi
  • 28,163
  • 29
  • 106
  • 188
20
votes
5 answers

StackExchange.Redis timeout

Production environment is on Azure, using Redis Cache Standard 2.5GB. Example 1 System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> StackExchange.Redis.RedisTimeoutException:…
Tom Gullen
  • 61,249
  • 84
  • 283
  • 456
20
votes
1 answer

How can I support the Redis sentinel architecture using StackExchange.Redis?

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…
Amir Popovich
  • 29,350
  • 9
  • 53
  • 99
20
votes
1 answer

Convert String[] array to RedisKey[] array

Trying to use KeyDelete(RedisKey[] keys, CommandFlags flags = CommandFlags.None); I have array of string[] , I am not seeing any examples out there when I search for converting these data types. I am not even sure how to create a new…
Justin Homes
  • 3,739
  • 9
  • 49
  • 78
20
votes
3 answers

StackExchange.Redis server.Keys(pattern:"IsVerySlow*")

I'm new to redis so I'm doing something wrong, I'm sure: I've stored roughly 16,000 key/values in Azure Redis. I used the following to write the keys/values foreach (var worksheet in wksList) { var wksYYMM =…
Weej
  • 1,012
  • 2
  • 8
  • 24
20
votes
2 answers

Redis keyspace notifications with StackExchange.Redis

I've looking around and I'm unable to find how to perform a subscription to keyspace notifications on Redis using StackExchange.Redis library. Checking available tests I've found pubsub using channels, but this is more to work like a service…
Matías Fidemraizer
  • 63,804
  • 18
  • 124
  • 206
19
votes
1 answer

Flush/Empty db in StackExchange.Redis

I am using StackExchange.Redis in my application to store key/values. I need to flush the entire db now which Redis is using. I found a way via command How do I delete everything in Redis? but how can I do this with StackExchange.Redis? I was not…
Raghav
  • 8,772
  • 6
  • 82
  • 106
18
votes
2 answers

Running multiple instance of Redis on Centos

I want to run multiple instance of Redis on Centos 7. Can anyone point me to proper link or post steps here. I googled for the information but I didn't find any relevant information.
Ashish Sinha
  • 194
  • 1
  • 1
  • 10
18
votes
4 answers

StackExchange.Redis ConnectionMultiplexer.Connect() Intermittently Works

I am using StackExchange.Redis to talk to 3 different Redis instances: 1 on the same subnet and 2 remotely. Here's my configuration code: var configurationOptions = new ConfigurationOptions { EndPoints = { { host, port } }, …
Haney
  • 32,775
  • 8
  • 59
  • 68
17
votes
2 answers

Clear Azure Redis Cache

Due to some issue where I need to clear all the cache data on the Redis cache hosted on the Azure.In other words by using the Azure portal.Not by using my application.One option I can think of is,Delete the Redis cache instance and recreate it.But…
Sampath
  • 63,341
  • 64
  • 307
  • 441
17
votes
1 answer

Can StackExchange.Redis be used to store POCO?

I am trying to evaluate Redis by using two well known C# drivers ServiceStack and StackExchange. Unfortunately I cannot use ServiceStack because it's not free. Now I'm trying StackExchange. Does anybody know whether with StackExchange.Redis I can…
SomeGuyWhoCodes
  • 579
  • 6
  • 19
16
votes
1 answer

StackExchange.Redis.RedisTimeoutException: Timeout awaiting response

I have a Redis cluster of 6 instances, 3 master and 3 slaves. My ASP .NET Core application uses it as a cache. Sometimes I get such an error: StackExchange.Redis.RedisTimeoutException: Timeout awaiting response (outbound=0KiB, inbound=5KiB, 5504ms…
Vas Mil
  • 605
  • 1
  • 8
  • 21
16
votes
4 answers

StackExchange.Redis.StrongName is refrenced but not included as package

I'm starting a new project using StackExchange.Redis and .Net Core 2.0. But I get a conflict: The type 'ConnectionMultiplexer' exists in both 'StackExchange.Redis.StrongName, Version=1.2.4.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46' and…
Lejdholt
  • 532
  • 7
  • 21
16
votes
7 answers

No connection is available to service this operation: when using Azure Redis Cache

I have the following code which I use to get information from the cache. I dont know if maybe my app is opening too many connections or just this error is due to a transient failure on azure redis cache. This is the stack…
Luis Valencia
  • 32,619
  • 93
  • 286
  • 506
16
votes
4 answers

How to use Moq to mock up the StackExchange.Redis ConnectionMultiplexer class?

I am working to mock up behaviors related to the StackExchange.Redis library, but can't figure out how to properly mock the sealed classes it uses. A specific example is in my calling code I'm doing something like this: var cachable = command as…
Sam Storie
  • 4,444
  • 4
  • 48
  • 74
1
2
3
73 74