Open elinun opened 9 months ago
There's a lot more going on here because there's a full AppInsights in your get database path (all we do is return a ref btw - you can simply cache the database. That telemetry client is adding a lot of overhead comparing to anything we're doing. You'll want to try a base approach without any of that and build back up to see where your performance is tanking.
I am currently using StackExchange.Redis version 2.1.58 (but my problem persists even after upgrading to 2.7.17), and I am having issues with SDK calls taking a long time to execute (1-5 seconds). I have added logging and have found that the lines taking a long time to execute are the call to IDatabase.KeyExistsAsync(string key) and call to Multiplexer.GetDatabase(). Using Wireshark, I noticed that even though the redis server responded near instantaneously, the KeyExistsAsync call still took over 1 second to complete. I have increased my min thread count to 300. My Slowlog is empty.
Here is my RedisCache class:
Then I am calling this class with the following code:
These are the options specified in my connection string:
ssl=True,sslprotocols=tls12,abortConnect=False