Skip to content

Commit

Permalink
Add multiplier for the dialer
Browse files Browse the repository at this point in the history
Originally multipilier is default to 0, which will cause flodding if
backoff happens. Now setting multiplier to 1.6 which is the default
multiplier value in grpc.

Signed-off-by: Hanlin Shi <[email protected]>
  • Loading branch information
hanlins committed Dec 9, 2020
1 parent d1e3dea commit 4bd8f15
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions container/containerd/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,10 @@ func Client(address, namespace string) (ContainerdClient, error) {
tryConn.Close()

connParams := grpc.ConnectParams{
Backoff: backoff.Config{
BaseDelay: baseBackoffDelay,
MaxDelay: maxBackoffDelay,
},
Backoff: backoff.DefaultConfig,
}
connParams.Backoff.BaseDelay = baseBackoffDelay
connParams.Backoff.MaxDelay = maxBackoffDelay
gopts := []grpc.DialOption{
grpc.WithInsecure(),
grpc.WithContextDialer(dialer.ContextDialer),
Expand Down

0 comments on commit 4bd8f15

Please sign in to comment.