-
Notifications
You must be signed in to change notification settings - Fork 526
Hedging: Adds back diagnostics filed Response Region to hedging request diagnostics
#5412
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
Merged
FabianMeiswinkel
merged 9 commits into
master
from
users/nalutripician/hedingReAddResponseRegionToDiagnostics
Sep 30, 2025
Merged
Hedging: Adds back diagnostics filed Response Region to hedging request diagnostics
#5412
FabianMeiswinkel
merged 9 commits into
master
from
users/nalutripician/hedingReAddResponseRegionToDiagnostics
Sep 30, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kirankumarkolli
previously approved these changes
Sep 18, 2025
...soft.Azure.Cosmos/src/Routing/AvailabilityStrategy/CrossRegionHedgingAvailabilityStrategy.cs
Show resolved
Hide resolved
kirankumarkolli
approved these changes
Sep 24, 2025
kundadebdatta
approved these changes
Sep 24, 2025
Member
kundadebdatta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
FabianMeiswinkel
approved these changes
Sep 30, 2025
Member
FabianMeiswinkel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This was referenced Oct 18, 2025
This was referenced Nov 9, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
auto-merge
Enables automation to merge PRs
Hedging
Any issue/feature request related to request hedging
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Template
Description
We plan to re-add the response region field in the diagnostics for hedged requests for a general quick way to view this information. This change will affect the diagnostics for all requests with hedging, and PPAF enabled. This will not affect the behavior of those requests, only add one field to the diagnostics.
We want to make it clear that there might be cases the response region may not indicate the correct response region at that point due to some edge case scenarios that can come up depending on what the hedging configuration is. (This is one of the reasons why we decided to remove it originally). The only true way to know where a response came from will be to parse the diagnostic string to see where the storeresponse (or httpresponse if in gatewaymode). We cannot add a 100% accurate standalone parameter in the diagnostics as this will have a negative effect on the response time and CPU overhead which would negate the benefits of hedging.
The aim of adding this parameter back is to help customers get a quick understanding of where the hedging response came from.
Diagnostics improvements:
Response Region, to record the actual region that serviced the request in the diagnostics trace for each hedged response. This helps differentiate between the intended target region and the region that ultimately processed the request. [1] [2] [3]Response tracking enhancements:
CloneAndSendAsyncandRequestSenderAndResultCheckAsyncmethods to pass and record the target region name for each hedged request, ensuring accurate tracking of which region was intended to handle each request. [1] [2]HedgingResponseclass to include a newTargetRegionNamefield, allowing each response to carry information about its intended region.HedgingResponseto properly set and propagate theTargetRegionNamefor both successful and unsuccessful responses.Type of change
Please delete options that are not relevant.
Closing issues
To automatically close an issue: closes #5408