From b6bc0ba945195c9ca6e39dac62f511a32751cc39 Mon Sep 17 00:00:00 2001 From: FireMasterK <20838718+FireMasterK@users.noreply.github.com> Date: Fri, 9 Apr 2021 20:07:35 +0530 Subject: [PATCH] Improve performance by not limiting connections and forcing http/2. --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index 2b1a110..56adc86 100644 --- a/main.go +++ b/main.go @@ -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, }, }