Unix socket support (refactored) - #9363
Open
dometto wants to merge 27 commits into
Open
Conversation
Make get_uds_path() respect XDG_RUNTIME_DIR and dask.config['temporary-directory']
…in service definition
This is easier than removing on stop. It technically introduces a race condition, but so would removing on stop, I think.
On Linux we need to unset XDG_RUNTIME_DIR when we're not testing it.
On Linux we need to unset XDG_RUNTIME_DIR when we're not testing it.
Contributor
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 40 files ± 0 40 suites ±0 14h 35m 4s ⏱️ + 2m 17s For more details on these failures, see this check. Results for commit 5e60065. ± Comparison against base commit dc182bd. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a slightly refactored version of #9337, removing subclassing of the main TCP class for better isolation. Pasting the original description below.
Resolves #3630
This PR adds support for Unix Domain Sockets...
commsThe rationale for this is twofold:
Test this branch with:
New UDS backend
This is the main part of this PR. We implement a new backend
UDSwhich subclasses the standardTCPclasses. When setting protocol on a cluster/worker/scheduler tounix://, this backend is used. When a worker or scheduler is given an absolute path, it will use that absolute path to create the unix socket. If instead any other value is passed in (e.g. the defaultlocalhost), the backend will create the socket at a new temporary path.Benefits
Performance
@mrocklin tested this:
Security
UDS support is desireable for usecases where:
inproc)ucxis not available (e.g. not on Linux)tcp).dask-labextensionfor instance), or desired (more overhead).Dashboard listening on UDS
When the
dashboard_urlis set to an absolute path, or tounix://, listen on UDS instead of TCP. This can help prevent new CVE's of the form GHSA-c336-7962-wfj2