From edd14bc193a27f679842083ed55c9e2d955fdcfc Mon Sep 17 00:00:00 2001 From: "Jason E. Aten" Date: Mon, 27 Mar 2017 13:34:09 -0700 Subject: [PATCH] increase initialWindowSize and initialConnWindowSize by 2048. Improves throughput by 5x. Partially addresses #1043. --- transport/control.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/transport/control.go b/transport/control.go index 64d22f849b2b..ba5dc7b2fc9f 100644 --- a/transport/control.go +++ b/transport/control.go @@ -44,10 +44,10 @@ import ( const ( // The default value of flow control window size in HTTP2 spec. - defaultWindowSize = 65535 + defaultWindowSize = 65536 // The initial window size for flow control. - initialWindowSize = defaultWindowSize // for an RPC - initialConnWindowSize = defaultWindowSize * 16 // for a connection + initialWindowSize = defaultWindowSize * 2048 // for an RPC + initialConnWindowSize = defaultWindowSize * 16 * 2048 // for a connection infinity = time.Duration(math.MaxInt64) defaultClientKeepaliveTime = infinity defaultClientKeepaliveTimeout = time.Duration(20 * time.Second)