Skip to content

Commit

Permalink
etcdserver: Let clients establish unlimited streams
Browse files Browse the repository at this point in the history
From go-grpc v1.2.0, the number of max streams per client is set to 100
by default by the server side. This change makes it impossible
for third party proxies and custom clients to establish many streams.
  • Loading branch information
Iwasaki Yudai committed Jul 8, 2017
1 parent 69e8a92 commit dde3bf9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions etcdserver/api/v3rpc/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package v3rpc

import (
"crypto/tls"
"math"

"github.com/coreos/etcd/etcdserver"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
Expand All @@ -42,6 +43,7 @@ func Server(s *etcdserver.EtcdServer, tls *tls.Config) *grpc.Server {
opts = append(opts, grpc.UnaryInterceptor(newUnaryInterceptor(s)))
opts = append(opts, grpc.StreamInterceptor(newStreamInterceptor(s)))
opts = append(opts, grpc.MaxMsgSize(int(s.Cfg.MaxRequestBytes+grpcOverheadBytes)))
opts = append(opts, grpc.MaxConcurrentStreams(math.MaxUint32))
grpcServer := grpc.NewServer(opts...)

pb.RegisterKVServer(grpcServer, NewQuotaKVServer(s))
Expand Down

0 comments on commit dde3bf9

Please sign in to comment.