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

This change enables configuration of http connection pooling #286

Merged
merged 5 commits into from
Jun 5, 2024

Conversation

wolfeidau
Copy link
Contributor

@wolfeidau wolfeidau commented Jun 4, 2024

To provide customers with more options to tune for their situation this introduces a new option to reduce or disable connection reuse. In some cases disabling connection reuse may avoid read timeouts or pausing for connections a server, or CDN may deprioritize.

I have also updated the documentation for the expanded timeout option to highlight it is used for more than just request timeout.

Also disabled redirects, again to ensure the client completes the operation quickly.

See https://github.com/golang/go/blob/master/src/net/http/transport.go#L44-L55 for more context on the defaults.

To provide customers with more options to tune for their situation this
introduces a new option to reduce or disable connection reuse. In some
cases disabling connection reuse may avoid read timeouts or pausing for
connections a server, or CDN may deprioritize.

I have also updated the documentation for the expanded timeout option to
highlight it is used for more than just request timeout.
@wolfeidau wolfeidau marked this pull request as ready for review June 5, 2024 03:22
Copy link
Contributor

@DrJosh9000 DrJosh9000 left a comment

Choose a reason for hiding this comment

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

Good job!

lambda/main.go Outdated Show resolved Hide resolved
@wolfeidau wolfeidau force-pushed the feat_add_max_idle_connections branch from b15f7a2 to 5e1c6df Compare June 5, 2024 04:11
@wolfeidau wolfeidau requested a review from DrJosh9000 June 5, 2024 04:59
Copy link
Contributor

@DrJosh9000 DrJosh9000 left a comment

Choose a reason for hiding this comment

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

Happy if you want to merge now and follow up, or make more changes.

lambda/main_test.go Show resolved Hide resolved
lambda/main_test.go Outdated Show resolved Hide resolved
@wolfeidau wolfeidau requested a review from DrJosh9000 June 5, 2024 06:53
Copy link
Contributor

@DrJosh9000 DrJosh9000 left a comment

Choose a reason for hiding this comment

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

LGTM

@wolfeidau wolfeidau merged commit 4a430c8 into master Jun 5, 2024
1 check passed
@wolfeidau wolfeidau deleted the feat_add_max_idle_connections branch June 5, 2024 06:58
wolfeidau added a commit that referenced this pull request Jun 6, 2024
[Full Changelog](v5.9.5...v5.9.6)

- This change enables configuration of http connection pooling [#286](#286) (@wolfeidau)
- This change will ensure a single HTTP client is created [#285](#285) (@wolfeidau)
wolfeidau added a commit that referenced this pull request Jun 6, 2024
[Full Changelog](v5.9.5...v5.9.6)

- This change enables configuration of http connection pooling [#286](#286) (@wolfeidau)
- This change will ensure a single HTTP client is created [#285](#285) (@wolfeidau)
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