Skip to content

Set HTTP client MaxIdleConns as well - #167

Merged
Neurostep merged 1 commit into
mainfrom
maksimt/aws-http-client-idle-connections
Aug 3, 2026
Merged

Set HTTP client MaxIdleConns as well#167
Neurostep merged 1 commit into
mainfrom
maksimt/aws-http-client-idle-connections

Conversation

@Neurostep

@Neurostep Neurostep commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Description

In this PR we are setting the HTTP client MaxIdleConns as well as MaxIdleConnsPerHost. Previously, the value was only set to MaxIdleConnsPerHost changing the default value from 2 to whatever is provided. But overall pool is capped at MaxIdleConns with the value of 100.

Checklist

  • Prefixed the PR title with the JIRA ticket code
  • Performed simple, atomic commits with good commit messages
  • Verified that the commit history is linear and commits are squashed as necessary
  • Thoroughly tested the changes in development and/or staging
  • Updated the README.md as necessary

Related links


Note

Low Risk
Small, well-tested change to AWS client HTTP transport tuning; no auth or data-path logic changes.

Overview
Fixes AWS SDK HTTP client pooling so max_idle_conns actually raises the total idle connection cap, not only per-host.

createHttpClient now sets MaxIdleConns and MaxIdleConnsPerHost to the configured value when it is > 0; when unset (0), the cloned transport keeps Go’s http.DefaultTransport limits instead of overriding only per-host. That removes the case where a value above 100 was effectively capped by the default transport-wide MaxIdleConns.

Docs and HTTPClient comments describe per-host and total behavior; tests cover MaxIdleConns, a 256 pool, and zero config.

Reviewed by Cursor Bugbot for commit 460d0bc. Bugbot is set up for automated code reviews on this repo. Configure here.

@Neurostep
Neurostep requested a review from a team as a code owner August 3, 2026 09:37

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 75ebc49. Configure here.

Comment thread pkg/aws/aws.go Outdated
@Neurostep
Neurostep force-pushed the maksimt/aws-http-client-idle-connections branch from 75ebc49 to 460d0bc Compare August 3, 2026 09:49

@terranisu terranisu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 🛠️

@Neurostep
Neurostep merged commit 7d87c9f into main Aug 3, 2026
7 checks passed
@Neurostep
Neurostep deleted the maksimt/aws-http-client-idle-connections branch August 3, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants