-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adaptive queue for staging dials #237
Merged
Merged
Commits on Jan 29, 2019
-
introduce adaptive queue for DHT dials.
This patch introduces an adaptive dial queue that spawns a dynamically sized set of goroutines to preemptively stage dials for later handoff to the DHT protocol for RPC. It identifies backpressure on both ends (dial consumers and dial producers), and takes compensating action by adjusting the worker pool. We start with `DialQueueMinParallelism` number of workers (6), and scale up and down based on demand and supply of dialled peers. The following events trigger scaling: - we scale up when we can't immediately return a successful dial to a new consumer. - we scale down when we've been idle for a while waiting for new dial attempts. - we scale down when we complete a dial and realise nobody was waiting for it. Dialler throttling (e.g. FD limit exceeded) is a concern, as we can easily spin up more workers to compensate, and end up adding fuel to the fire. Since we have no deterministic way to detect this for now, we hard-limit concurrency to `DialQueueMaxParallelism` (20).
Configuration menu - View commit details
-
Copy full SHA for 5e74c4a - Browse repository at this point
Copy the full SHA 5e74c4aView commit details -
Configuration menu - View commit details
-
Copy full SHA for f044043 - Browse repository at this point
Copy the full SHA f044043View commit details -
Configuration menu - View commit details
-
Copy full SHA for 95a0975 - Browse repository at this point
Copy the full SHA 95a0975View commit details -
Configuration menu - View commit details
-
Copy full SHA for 24f0a2d - Browse repository at this point
Copy the full SHA 24f0a2dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7cd14f5 - Browse repository at this point
Copy the full SHA 7cd14f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for abacfe5 - Browse repository at this point
Copy the full SHA abacfe5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8366041 - Browse repository at this point
Copy the full SHA 8366041View commit details -
Configuration menu - View commit details
-
Copy full SHA for 72f9d4c - Browse repository at this point
Copy the full SHA 72f9d4cView commit details -
Configuration menu - View commit details
-
Copy full SHA for f2df3ec - Browse repository at this point
Copy the full SHA f2df3ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for bf4b91c - Browse repository at this point
Copy the full SHA bf4b91cView commit details
Commits on Jan 30, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 74d22f3 - Browse repository at this point
Copy the full SHA 74d22f3View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.