Add support for Redis Sentinel to RedisSessionStateProvider
RedisSessionStateProvider configuration allows only a single redis host name to be configured; this host is a single point of failure in non-azure installations. To allow use of the distributed high-availability features of redis it is necessary for this provider to support redis sentinel.
RedisSessionStateProvider is in use in the Azure platform where redis is provided as a guaranteed service at a given host name (or IP address?), presumably via some form of load balancer that can redirect traffic in the event of server failures.
In a non-azure installation the standard approach for high-availability redis is to use redis sentinel, therefore it would be beneficial for RedisSessionStateProvider to support this, thus providing a high-availability session state store for 'plain' (non-azure) ASP.NET applications running on a load balanced web farm.
@Craig oh ok. So we can indeed specify multiple hosts via a connection string. I was looking at the other use case whereby you can specify the individual config options, and in that mode the host config setting will only accept a single host/endpoint. That is why I previously concluded there was no multi-host support. I will try using a connection string instead; is that the preferred approach generally?
@Craig: do you currently have it working in this configuration with multiple hostnames/IP-s?
We've been trying to get our ASP.NET app to connect to a 3-node cluster we have running (non-Azure), but to no avail.
It happily connects to either one of the nodes, but only to one at a time.
You can add more than one address to the connection string,
The RedisSessionStateProvider determines the master from the list, and running sentinel over the top of your servers will assign a master in the event of a failure.