Skip to content

Commit

Permalink
fast_forward: increase MaxIdleConnsPerHost and set MaxConnsPerHost
Browse files Browse the repository at this point in the history
  • Loading branch information
IrineSistiana committed Jan 12, 2021
1 parent aa48b23 commit 391e04b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dispatcher/plugin/executable/fast_forward/upstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ func newFastUpstream(config *UpstreamConfig, logger *zap.Logger) (*fastUpstream,
DisableKeepAlives: idleTimeout == 0,
IdleConnTimeout: idleTimeout,
ResponseHeaderTimeout: timeout,
// MaxConnsPerHost and MaxIdleConnsPerHost should be equal.
// Otherwise, it might seriously affect the efficiency of connection reuse.
MaxConnsPerHost: 5,
MaxIdleConnsPerHost: 5,
}
_, err := http2.ConfigureTransports(t)
if err != nil {
Expand Down

0 comments on commit 391e04b

Please sign in to comment.