Improve performance by not limiting connections and forcing http/2.

This commit is contained in:
FireMasterK 2021-04-09 20:07:35 +05:30
parent 413e15199b
commit b6bc0ba945
No known key found for this signature in database
GPG Key ID: 8DFF5DD33E93DB58
1 changed files with 5 additions and 0 deletions

View File

@ -31,6 +31,11 @@ var h2client = &http.Client{
ResponseHeaderTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
IdleConnTimeout: 30 * time.Second,
ReadBufferSize: 16 * 1024,
ForceAttemptHTTP2: true,
MaxConnsPerHost: 0,
MaxIdleConnsPerHost: 10,
MaxIdleConns: 0,
},
}