Skip to content

Commit edd14bc

Browse files
committed
increase initialWindowSize and initialConnWindowSize by 2048.
Improves throughput by 5x. Partially addresses #1043.
1 parent 14a6be4 commit edd14bc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

transport/control.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ import (
4444

4545
const (
4646
// The default value of flow control window size in HTTP2 spec.
47-
defaultWindowSize = 65535
47+
defaultWindowSize = 65536
4848
// The initial window size for flow control.
49-
initialWindowSize = defaultWindowSize // for an RPC
50-
initialConnWindowSize = defaultWindowSize * 16 // for a connection
49+
initialWindowSize = defaultWindowSize * 2048 // for an RPC
50+
initialConnWindowSize = defaultWindowSize * 16 * 2048 // for a connection
5151
infinity = time.Duration(math.MaxInt64)
5252
defaultClientKeepaliveTime = infinity
5353
defaultClientKeepaliveTimeout = time.Duration(20 * time.Second)

0 commit comments

Comments
 (0)