Improve performance by not limiting connections and forcing http/2.
This commit is contained in:
parent
413e15199b
commit
b6bc0ba945
1 changed files with 5 additions and 0 deletions
5
main.go
5
main.go
|
@ -31,6 +31,11 @@ var h2client = &http.Client{
|
||||||
ResponseHeaderTimeout: 10 * time.Second,
|
ResponseHeaderTimeout: 10 * time.Second,
|
||||||
ExpectContinueTimeout: 1 * time.Second,
|
ExpectContinueTimeout: 1 * time.Second,
|
||||||
IdleConnTimeout: 30 * time.Second,
|
IdleConnTimeout: 30 * time.Second,
|
||||||
|
ReadBufferSize: 16 * 1024,
|
||||||
|
ForceAttemptHTTP2: true,
|
||||||
|
MaxConnsPerHost: 0,
|
||||||
|
MaxIdleConnsPerHost: 10,
|
||||||
|
MaxIdleConns: 0,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue