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

Hedged-request: Handling in HTTP Client Configuration #118

Closed

Conversation

Vanshikav123
Copy link

@Vanshikav123 Vanshikav123 commented May 4, 2024

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Initiation change for
thanos-io/thanos#6712

Verification

Signed-off-by: Vanshikav123 <vanshikav928@gmail.com>
@Vanshikav123
Copy link
Author

@GiedriusS PTAL!

Copy link
Member

@GiedriusS GiedriusS left a comment

Choose a reason for hiding this comment

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

Thanks for your work on this 🙇 I added suggestions in line. Please let me know if you have any questions

@@ -135,8 +136,15 @@ func appendHttpOptions(gc Config, opts []option.ClientOption) ([]option.ClientOp
return nil, err
}

httpCli := &http.Client{
hedgedClient, err := hedgedhttp.New(hedgedhttp.Config{
Copy link
Member

Choose a reason for hiding this comment

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

All of this hedgedhttp.New() must be inside Thanos code, not here, because otherwise you will be forcing hedged HTTP requests on all clients of this library.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you for your assistance ! i want to confirm my query that you want me to create hedgedhttp.Client into the Thanos codebase itself, and expose a configuration option only to enable or disable hedged requests? something like this ?

})
if err != nil {
return nil, err
}
chain = []credentials.Provider{
wrapCredentialsProvider(&credentials.EnvAWS{}),
wrapCredentialsProvider(&credentials.FileAWSCredentials{}),
wrapCredentialsProvider(&credentials.IAM{
Client: &http.Client{
Copy link
Member

Choose a reason for hiding this comment

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

The Transport need to come from this function here: https://github.com/thanos-io/objstore/blob/main/client/factory.go#L65

@Vanshikav123 Vanshikav123 reopened this May 14, 2024
@Vanshikav123 Vanshikav123 changed the title Hedged-request: Handling in HTTP Client Configuration [WIP] Hedged-request: Handling in HTTP Client Configuration May 14, 2024
@Vanshikav123 Vanshikav123 changed the title [WIP] Hedged-request: Handling in HTTP Client Configuration Hedged-request: Handling in HTTP Client Configuration May 19, 2024
@Vanshikav123
Copy link
Author

Vanshikav123 commented May 19, 2024

Hey ! @GiedriusS closing this one ! PTAL for #119

@Vanshikav123 Vanshikav123 deleted the patch-hedged_request branch May 19, 2024 19:13
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.

None yet

2 participants