Skip to content

Commit

Permalink
rpc: set max-concurrent streams to math.MaxInt32
Browse files Browse the repository at this point in the history
The max-concurrent streams setting affects how many concurrent
streams/unary-RPCs are allowed on the server and this setting is
propagated across to the client connection. The default client
connection max-streams setting is 100 which seems unreasonably low and
may be contributing to high latencies.

Fixes #14769
  • Loading branch information
petermattis committed Apr 11, 2017
1 parent 3d47385 commit 5993e0d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/rpc/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ func NewServer(ctx *Context) *grpc.Server {
// Our maximum kv size is unlimited, so we need this to be very large.
// TODO(peter,tamird): need tests before lowering
grpc.MaxMsgSize(math.MaxInt32),
// The default number of concurrent streams/requests on a client connection
// is 100, while the server is unlimited. The client setting can only be
// controlled by adjusting the server value. Set a very large value for the
// server value so that we have no fixed limit on the number of concurrent
// streams/requests on either the client or server.
//
// TODO(peter): This setting should be revisited.
grpc.MaxConcurrentStreams(math.MaxInt32),
grpc.RPCDecompressor(snappyDecompressor{}),
}
// Compression is enabled separately from decompression to allow staged
Expand Down

0 comments on commit 5993e0d

Please sign in to comment.