Thursday, May 11, 2017

Exponential backoff for retry mechanism

For retry mechanism, rather than retrying on a specific interval of time, it is advisable to handle it with exponential backoff. This is important in the world of Azure, Pass or any where you are communicating with external resources, as there are more chances of transient errors compared to local resources. 

All communicating with the external resources should have retry mechanism. There are some nuget packages available to handle the transient errors but following articles shows a nice and neat implementation of handling them with exponential backoff. And give us control to change the code as per our requirements.