Skip to content

Commit

Permalink
Add gRPC keepalives for Contour->Envoy comms
Browse files Browse the repository at this point in the history
Fixes projectcontour#1744

Signed-off-by: Nick Young <ynick@vmware.com>
  • Loading branch information
Nick Young committed Oct 22, 2019
1 parent f122601 commit c00b882
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/contour/servecontext.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/projectcontour/contour/internal/contour"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/keepalive"
)

type serveContext struct {
Expand Down Expand Up @@ -195,6 +196,12 @@ func (ctx *serveContext) grpcOptions() []grpc.ServerOption {
//
// Somewhat arbitrary limit to handle many, many, EDS streams.
grpc.MaxConcurrentStreams(1 << 20),
// Set gRPC keepalive params.
// See https://github.com/projectcontour/contour/issues/1756 for background.
grpc.KeepaliveParams(keepalive.ServerParameters{
Time: 60 * time.Second,
Timeout: 20 * time.Second,
}),
}
if !ctx.PermitInsecureGRPC {
tlsconfig := ctx.tlsconfig()
Expand Down

0 comments on commit c00b882

Please sign in to comment.