Redis speed suggestions

I have implemented an Azure Redis cache in my API. It uses the CacheResponse attribute, as well as Setting and Getting items from the CacheClient.

Things seems to work find for just a few users, however when the users are in the thousands everything grinds to a crawl response-time wise. CPU usage flies up and even requests that do no processing and should be served directly from the CacheResponse take a long time.

Are there any suggestions when working with an Azure Redis cache? The web app and cache are hosted in the same region. Are there any special flags that need to be set on Redis? Is the PooledRedisClientManager struggling somehow?

To mitigate some issues I marked all CacheResponse attributes with UseLocal as true.

Exceeded timeout of 00:00:03


Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. 

Is what I get littered all over my log file.

I upgraded to the premium tier and the timeouts vanished. How bizarre! I’m not overly impressed by the speed of redis however.

I’d assume the Azure tiered versions of Redis are assigned little resources so they force you to upgrade, you can try running Redis in a VM as it wouldn’t have the same restrictions and will be able to use all the CPU/RAM resources in your VM.

Going to try run the windows version of Redis as a service. It’s mainly for caching purposes. Hopefully works better than Azure (and cheaper).