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

fix(http): Use shared http.Transport #18381

Merged
merged 1 commit into from
Jun 5, 2020
Merged

Conversation

stuartcarnie
Copy link
Contributor

@stuartcarnie stuartcarnie commented Jun 5, 2020

Following precedent established in net/http, this PR updates the influxdb/v2/http and influxdb/v2/pkg/httpc packages to use shared http.Transport instances when creating http.Clients. This is necessary to ensure connections which utilize HTTP keep-alive are reused, along with other benefits of pooling.

This is following precedent established in `net/http`, by using a
shared `http.Transport`. This is necessary to ensure connections which
utilize HTTP keep-alive are reused, along with other benefits of
pooling.
@stuartcarnie stuartcarnie self-assigned this Jun 5, 2020
@stuartcarnie stuartcarnie requested a review from jsteenb2 June 5, 2020 16:53
Copy link
Contributor

@jsteenb2 jsteenb2 left a comment

Choose a reason for hiding this comment

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

👍

@stuartcarnie stuartcarnie merged commit ba14b4a into master Jun 5, 2020
@stuartcarnie stuartcarnie deleted the sgc/shared-transport branch June 5, 2020 17:09
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.

2 participants