Skip to content

Conversation

@brycematheson1234
Copy link

Problem we observed

In cases where forceConnect consistently throws an exception e.g. the instance reached the maximum number of connections, the code enters a loop of:

  1. Attempt to connect
  2. Fail
  3. Wait 100ms
  4. Go back to step 1.

forceConnect is a somewhat expensive operation that burns a non-trivial amount of CPU in this loop. We observed this consuming 15% of our k8s pod CPU

image image

Proposal

Add exponential backoff with jitter up to a maximum of five seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant