Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hedging: Adds support for writes on multi region accounts #4706

Open
wants to merge 37 commits into
base: master
Choose a base branch
from

Conversation

NaluTripician
Copy link
Contributor

@NaluTripician NaluTripician commented Sep 18, 2024

Pull Request Template

Description

Adds support to use hedging on write requests for multimaster accounts. Note that this does come with the caveat that there will be more 409 errors thrown by the SDK. This is expected and applications that adapt this feature should be prepared to handle these exceptions.

This feature will also be an opt in feature for Availability Strategies and users will need to especially specify that in the availability strategy definition.

ItemRequestOptions requestOptions = new ItemRequestOptions
{
    AvailabilityStrategy = new CrossRegionHedgingAvailabilityStrategy(
        threshold: TimeSpan.FromMilliseconds(100),
        thresholdStep: TimeSpan.FromMilliseconds(50),
        multiMasterWritesEnabled: true)
};

Type of change

Please delete options that are not relevant.

  • [] New feature (non-breaking change which adds functionality)

Closing issues

To automatically close an issue: closes #4457

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!

@NaluTripician NaluTripician changed the title add mm hedging support Hedging: Adds support for multimaster writes Sep 18, 2024
@NaluTripician NaluTripician self-assigned this Sep 18, 2024
@NaluTripician NaluTripician added the Hedging Any issue/feature request related to request hedging label Sep 18, 2024
@NaluTripician NaluTripician marked this pull request as ready for review October 10, 2024 19:51
@NaluTripician NaluTripician requested a review from a team as a code owner October 15, 2024 17:23
Copy link
Member

@Pilchie Pilchie left a comment

Choose a reason for hiding this comment

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

The feature is not named "multi-master", right? We call it multiple write regions, or active-active in docs. We should change the API to match.

Copy link
Member

@FabianMeiswinkel FabianMeiswinkel left a comment

Choose a reason for hiding this comment

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

LGTM with few minor comments

@NaluTripician NaluTripician changed the title Hedging: Adds support for multimaster writes Hedging: Adds support for writes on multi region accounts Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hedging Any issue/feature request related to request hedging
Projects
Status: Reviewer_Waiting
Development

Successfully merging this pull request may close these issues.

Hedging With Writes on MultiMaster
5 participants