Skip to content

Conversation

@amerjusupovic
Copy link
Contributor

@amerjusupovic amerjusupovic commented Jun 26, 2025

Currently, the provider doesn't backoff all replicas as expected.

Expected

If there are 2 or more endpoints (1 store endpoint and 1+ replicas) and a request to the first endpoint fails with an exception that the provider does not consider "failoverable" (requesting another endpoint will not solve the issue), all endpoints will be backed off with an exponential backoff factoring in 1 failed request. This means the initial backoff will be around the minimum backoff time of 30 seconds.

Actual

If there are 2 or more endpoints (1 store endpoint and 1+ replicas) and a request to the first endpoint fails with an exception that the provider does not consider "failoverable" (requesting another endpoint will not solve the issue), only the current endpoint will be backed off. The backoff is also incorrectly calculated to be longer than expected.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

The PR fixes how endpoint failover backoff is applied by ensuring all clients back off after a non-failoverable exception and adds a test validating this behavior.

  • Add a unit test to verify all clients back off after a non-failoverable exception during refresh.
  • Fix backoff logic to use the current client’s endpoint rather than the previous one.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tests/Tests.AzureAppConfiguration/Unit/FailoverTests.cs New test FailOverTests_AllClientsBackedOffAfterNonFailoverableException added
src/Microsoft.Extensions.Configuration.AzureAppConfiguration/AzureAppConfigurationProvider.cs Changed backoff status update to use GetEndpointForClient(currentClient) instead of previousEndpoint

@zhiyuanliang-ms zhiyuanliang-ms self-assigned this Jul 31, 2025
@zhiyuanliang-ms
Copy link
Member

@microsoft-github-policy-service agree

@zhiyuanliang-ms
Copy link
Member

@microsoft-github-policy-service agree company="Microsoft"

@zhiyuanliang-ms
Copy link
Member

CLA cannot be agreed. Move to #686

@zhiyuanliang-ms zhiyuanliang-ms deleted the ajusupovic/backoffallclients-bug branch August 5, 2025 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants