Increase IdleConnTimeout from 120ms to 5s#36
Conversation
Whilst not as important here since a new HTTP client is created for every call to fetchYAML, this is being updated for consitency across components. Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
AI Pull Request OverviewSummary
Approval rating (1-10)8/10 - Solid improvement for connection handling, but lacks test coverage for HTTP client configuration. Summary per fileSummary per file
Overall AssessmentThe PR makes a reasonable improvement to HTTP client configuration by extending the idle connection timeout from an overly aggressive 120ms to a more standard 5 seconds, which should enhance connection pooling efficiency for YAML fetching operations. The cleanup of commented code is beneficial for maintainability. However, the absence of tests covering the HTTP transport settings represents a risk for future regressions in network behavior. Detailed ReviewDetailed Reviewstack/stack.go
AI agent details. |
Description
Increase the
IdleConnTimeoutinmakeHTTPClientfrom 120ms to 5s. The previous value was too aggressive and could cause connections to be closed before they could be reused from the connection pool.Also removes commented-out transport configuration (
KeepAlive,MaxIdleConns,DisableKeepAlives) that was left behind.Motivation and Context
Whilst not as important here since a new HTTP client is created for every call to fetchYAML, this is being updated for consistency across components.