fix(idtoken): increase MaxIdleConnsPerHost to 100 in NewClient#1754
Merged
quartzmo merged 2 commits intogoogleapis:mainfrom Nov 21, 2022
Merged
fix(idtoken): increase MaxIdleConnsPerHost to 100 in NewClient#1754quartzmo merged 2 commits intogoogleapis:mainfrom
quartzmo merged 2 commits intogoogleapis:mainfrom
Conversation
codyoss
reviewed
Nov 21, 2022
| opts = append(opts, option.WithTokenSource(ts), internaloption.SkipDialSettingsValidation()) | ||
| t, err := htransport.NewTransport(ctx, http.DefaultTransport, opts...) | ||
| httpTransport := http.DefaultTransport.(*http.Transport).Clone() | ||
| httpTransport.MaxIdleConnsPerHost = 100 |
Member
There was a problem hiding this comment.
This seems like a large increase. The default when not set is 2 for comparison. I wonder if there is a different way we could enable users to do something like this.
Member
Author
There was a problem hiding this comment.
This is the same default set in transport/http/dial.go. See some potentially relevant discussion here.
Member
Author
There was a problem hiding this comment.
@david-gang Do you have any opinion on hardcoding to 100 here, as opposed to flexible configuration or some other value?
There was a problem hiding this comment.
@quartzmo 100 is fine for me. In the product i work on, we have 100 hardcoded for every http client.
codyoss
approved these changes
Nov 21, 2022
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
closes: #1744