Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AzureRedis-PatchingProces
@b-anand

This comment has been minimized.

Copy link

b-anand commented Oct 8, 2018

Can you share a code sample of how this must be implemented? The text can be interpreted differently by different people.

For example,

  1. Do we need to retry for TimeoutException, RedisConnectionException or SocketException even if abortConnect is set to false?

  2. There is a statement above:
    StackExchange.Redis will retry connection attempts - it will not retry operations. It is up to the application to retry operations.
    What does this mean? Retry the operations for what exceptions? (the above mentioned ones?) What if abortConnect is set to false and StackExchange.Redis will automatically reconnect? Do we still need to retry the operation?

@JonCole

This comment has been minimized.

Copy link
Owner Author

JonCole commented Oct 12, 2018

  1. Last I tested this (before StackExchange.Redis 2.0 was released), connection blips from the server being patched could result in all three of the exceptions you listed, so you need to expect any of these can happen. I don't know if/how that has changed since 2.0 was released.

  2. Any exception thrown might indicate that the operation you tried to perform could have failed, but, unfortunately, it is very difficult to say for sure. I have a short section on when to retry inside of my best practices doc that may help clarify.

I have also updated the above doc to recommend that you use the reboot feature as a way to test how your application is affected by connection blips during failover.

@radu-serbanescu

This comment has been minimized.

Copy link

radu-serbanescu commented Oct 18, 2019

Is there a metric and/or event that we can track in a dashboard to correlate spikes in RedisConnectionException with patching/failover timelines?

@JonCole

This comment has been minimized.

Copy link
Owner Author

JonCole commented Oct 19, 2019

https://docs.microsoft.com/en-us/azure/azure-cache-for-redis/cache-how-to-monitor#available-metrics-and-reporting-intervals has an "errors" metric that can be used to see failover events. We are planning on surfacing some audit events for patching as well, but I can't say yet when that will be available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.