Skip to content

Commit

Permalink
feat: change grpc client keepalive config (dragonflyoss#1125)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Mar 4, 2022
1 parent 00b1898 commit 5d50be3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/rpc/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ var defaultClientOpts = []grpc.DialOption{
grpc.WithInitialConnWindowSize(8 * 1024 * 1024),
grpc.WithInsecure(),
grpc.WithKeepaliveParams(keepalive.ClientParameters{
Time: 2 * time.Minute,
Timeout: 10 * time.Second,
Time: 20 * time.Second,
Timeout: 20 * time.Second,
}),
grpc.WithStreamInterceptor(streamClientInterceptor),
grpc.WithUnaryInterceptor(unaryClientInterceptor),
Expand Down
2 changes: 1 addition & 1 deletion pkg/rpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var DefaultServerOptions = []grpc.ServerOption{
grpc.ConnectionTimeout(10 * time.Second),
grpc.InitialConnWindowSize(8 * 1024 * 1024),
grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{
MinTime: 1 * time.Minute,
MinTime: 30 * time.Second,
}),
grpc.KeepaliveParams(keepalive.ServerParameters{
MaxConnectionIdle: 5 * time.Minute,
Expand Down

0 comments on commit 5d50be3

Please sign in to comment.