Update default HTTP client transport settings#78
Conversation
Remove deprecated DualStack dialer field and unnecessary KeepAlive override. Increase IdleConnTimeout from 120ms to 5s for more efficient connection reuse. Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
AI Pull Request OverviewSummary
Approval rating (1-10)9/10 - Solid performance optimization with proper testing, removes deprecated code, minimal risk. Summary per fileSummary per file
Overall AssessmentThe changes represent a well-motivated performance improvement by removing deprecated fields and tuning connection timeouts for better efficiency under load. The 120ms IdleConnTimeout was indeed too aggressive, potentially causing unnecessary connection overhead. Increasing to 5s aligns with common Go HTTP client recommendations and should improve throughput in high-traffic scenarios. Removal of deprecated DualStack field is appropriate as it's been a no-op since Go 1.16. The KeepAlive override removal allows the default 15s interval, which is more reasonable than 1s. Load testing provides confidence in the changes. Detailed ReviewDetailed Reviewproxy/proxy.go
AI agent details. |
Description
Remove deprecated
DualStackdialer field and unnecessaryKeepAliveoverride. IncreaseIdleConnTimeoutfrom 120ms to 5s for more efficient connection reuse.Motivation and context
DualStackfield onnet.Dialerhas been deprecated since Go 1.16 and is a no-op.KeepAliveof 1s was unnecessarily aggressive; the Go default (15s) is more appropriate.IdleConnTimeoutof 120ms was too short, causing idle connections to be closed prematurely and increasing connection churn under load.How has this been tested?
The changes were vendored into faas-netes Pro and tested with a load test.