Adventures with Azure Table Storage: Default Retry Policy

I am working on a .NET Core 3.0 C# example of the Repository design pattern leverage Azure Table Storage.

I have been using the Microsoft.Azure.Cosmos.Table library.

One thing that is nice about leveraging the available SDKs is that a Retry design pattern is often implemented by default using Polly.

For the life of me, I could not figure out what the retry policy was for the Microsoft.Azure.Cosmos.Table library.

I scoured all the related documentation and came up with nothing.

I know that when using the Microsoft.Azure.Cosmos library the default retry policy is to retry up to 9 times, maybe it was 9 because I was using the Table Api from Cosmos? Or maybe it was some other value.

So I fired up my project in Visual Studio 2019 in debug mode and took a peak at the RetryPolicy property for the instance of the CloudTableClient.

B-I-N-G-O! There it was.

The Microsoft.Azure.Cosmos.Table library uses ExponentialRetry with a maximum of 3 retries.

If you are interested in customizing the retry policy, take a look at on Chasing DevOps to learn how.

Related Articles

Hope this article saves a fellow developer a search or two!

Leave a Reply

Your email address will not be published.