[Feature Request] Provide ability to turn off the default retry-once policy and recommend retry policy #2877
Labels
Feature Request
ICM
This issue has a corresponding ICM, either for our team or another.
R9
Internal 1P
Milestone
By default, MSAL retries http calls once on 5xx with a delay of 1 second.
Scenario
In expert and high traffic scenarios, customers might want to provide own retry strategies, retry periods and resilient http client strategies (circuit breaker).
The behavior within MSAL then intercepts with the logic that the clients might want to inject through the WithHttpClientFactory configuration.
Proposal
Provide a knob to turn off the retry-once behavior of MSAL.
Note: see larger issue tracking this: #3561
Design
While we could add a complex extensiblity point such as the one described here, we recognize that retry libraries like Poly work perfectly fine at HttpClient level and Msal already exposes this layer. So the proposal is to add an overload to
WithHttpClientFactory
:WithHttpClientFactory(IMsalHttpClientFactory factory, bool disableDefaultRetryPolicy)
We should provide docs on how to add retry policy for HTTP.
The text was updated successfully, but these errors were encountered: