Issues Running Redis In Azure

I love Redis and use it in a few of my larger applications where performance is critical. These apps are hosted in Azure so I thought using the managed Redis service that Azure provides would be the best option for hosting. I’ve had some issues though – and ended up not using the managed Redis service.

The first issue I ran into was due to my Azure VMs being part of a Virtual Network. It turns out that there are network connection issues between Virutal Networks and the Redis Premium Tier. I forgot where I read about it, it might have been in a Stackoverflow answer, but these connection issues did not exist between Virtual Networks and the Redis Standard tier. I setup my Redis service on the Standard tier and all was good. Recently however, I have been getting a lot of the same network connection issues that I experienced when using the Premium tier. I have a feeling some of the same code that was causing problems in the Premium tier made its way down to the Standard tier.

I needed to find a solution so I setup Redis for Windows on one of my existing VMs. I use it on my development machine and haven’t had any problems so I thought it would be okay on a server. The VM I installed it on I also use for my service layer. There is more than enough RAM and it meant not going over the network from my service layer to Redis. It would have been great except that Redis for Windows started crashing randomly. There are no details as to why in the Event Log. My only choice was to find a new solution.

What I ended up doing was creating a new Ubuntu VM on the same Virtual Network as my other VMs and installing Redis on that. I feel like this is the best option since I have complete control over the server and the Redis service, it’s hosted on the OS it was meant to be hosted on, and the VM is dedicated to hosting Redis only. I haven’t been running this setup very long but I’m confident I won’t need to change it again.


Rush Frisby

Rush is a software architect who loves solving problems. You'll usually find him writing about security concepts and sharing solutions to problems he's faced.