Skip to content

Commit

Permalink
Update grpc clients' keepalive interval (#1231)
Browse files Browse the repository at this point in the history
Some reverse proxies might find 15s interval too short and respond with an enhance your-calm message

This change is setting the management and signal clients' keepalive interval to 30 seconds to minimize the number of reconnections
  • Loading branch information
mlsmaycon authored Oct 19, 2023
1 parent c979a4e commit a9f5fad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion management/client/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func NewClient(ctx context.Context, addr string, ourPrivateKey wgtypes.Key, tlsE
transportOption,
grpc.WithBlock(),
grpc.WithKeepaliveParams(keepalive.ClientParameters{
Time: 15 * time.Second,
Time: 30 * time.Second,
Timeout: 10 * time.Second,
}))
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion signal/client/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func NewClient(ctx context.Context, addr string, key wgtypes.Key, tlsEnabled boo
transportOption,
grpc.WithBlock(),
grpc.WithKeepaliveParams(keepalive.ClientParameters{
Time: 15 * time.Second,
Time: 30 * time.Second,
Timeout: 10 * time.Second,
}))

Expand Down

0 comments on commit a9f5fad

Please sign in to comment.