dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.19k stars 9.93k forks source link

.Caching.StackExchangeRedis Sentinel support #28367

Open FWest98 opened 3 years ago

FWest98 commented 3 years ago

Currently, the caching Redis plugin uses a simple ConnectionMultiplexer.ConnectAsync call with the given configuration. Unfortunately, this does not combine well with clusters with a sentinel.

My current workaround is using the new library version, implementing a Redis caching HealthCheck, and simply letting all application containers fail and be restarted by the orchestrator to connect to the new Redis master. This is, of course, not ideal.

It would be very much appreciated if support for sentinels can be incorporated into the library directly. For example, in the RedisCacheOptions add a bool option indicating the use of sentinel, and add code to retrieve the correct master on the fly; and retry this when the connection to the current master fails.

ghost commented 3 years ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.