Skip to content

Commit

Permalink
fixup: set max concurrent streams to 128
Browse files Browse the repository at this point in the history
16 might be a bit too "aggressive", set 128 like nginx does by default.
  • Loading branch information
matzf committed Oct 30, 2023
1 parent 36c72e1 commit 78b6ed0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/grpc/interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ func StreamClientInterceptor() grpc.DialOption {
// grpc-go prohibits more than MaxConcurrentStreams handlers from running at once, and setting this
// option so prevents easy resource exhaustion attacks from malicious clients.
func DefaultMaxConcurrentStreams() grpc.ServerOption {
// FIXME this number is pulled out of thin air.
return grpc.MaxConcurrentStreams(16)
// A very generic default value; this is the default that nginx appears to use.
return grpc.MaxConcurrentStreams(128)
}

// UnaryServerInterceptor constructs the default unary RPC server-side interceptor for
Expand Down

0 comments on commit 78b6ed0

Please sign in to comment.