Skip to content

Conversation

@jeet1995
Copy link
Member

@jeet1995 jeet1995 commented Sep 19, 2024

Pull Request Template

Problem Statement

As of today, customers who do not configure ApplicationPreferredRegions or ApplicationRegion are pinned to either the hub region (in multi-write accounts) or the primary region (in single-write accounts). In outage scenarios, availability is scoped to just a single region and is not ideal (both reads/writes in multi-write accounts and reads in single-write multi-region accounts have their availability curbed to just the one region). Setting ApplicationPreferredRegions or ApplicationRegion as empty is not an opt-out of availability decision from the customer's perspective unless of course on the client a regional endpoint has been set. This PR aims to fix this issue when preferred regions is not set, and a global endpoint is set on the client.

Approach taken in this PR

The idea is to construct an effective preferred region list and to rely on account-level read and account-level write regions for it. If there is client-perceived unavailability or account-level topology changes - then this effective preferred regions list is reordered accordingly or reflects the account-level regions post a cached DatabaseAccount refresh in the SDK.

There are also changes made to the flow which decides when DatabaseAccount refresh is triggered. The decision depends on a check whether the SDK has a different effective first preferred read / write region from the first account-level read / write region.

Closing issues

closes #4665

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

All good!

@jeet1995 jeet1995 changed the title Fix. Availability: Adds account-level read regions as effective preferred regions when preferred regions is not set on client. Sep 19, 2024
@jeet1995 jeet1995 marked this pull request as ready for review September 19, 2024 02:54
@kirankumarkolli kirankumarkolli merged commit 502a5a9 into master Oct 16, 2024
@kirankumarkolli kirankumarkolli deleted the users/jeet1995/crossRetryScenariosFixWhenPreferredRegionListIsEmpty branch October 16, 2024 18:34
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.

[SDK Cold Start] - Retry Metadata Requests in Other Regions When Preferred Regions is Empty and Hub Region is Offlined

6 participants