You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: Worker port ranges and/with nprocs support #899
I think it would be quite useful for dask-worker to support --nprocs with --foo-port=[range] so that systems with specific port ranges opened can have a number of processes opened from one call applied to a specified range opposed to having to write a shell loop to do the same.
Further, general support for port ranges and failing over to the next available port in a range if the current is taken would probably be quite useful in a similar situation as that described above.
@stuartarchibald, I assume you mean --nprocs=N --start-port=X will bind to ports X, X+1, X+2, etc? Are you expecting a specific pattern (e.g. first all worker ports, then all Bokeh ports), or is it indifferent?
which would start 16 worker processes bound to free ports between 5000 and 5100 and the same with http but s/5/6/g. This is with view of use cases where open ports are restricted to some particular range but some external reason requires computation to be undertaken in separate processes.
Find a way to ask the operating system for an unused port within a range
Assume that the system giving us the port range has already made them free for us, and just choose an increasing sequence (erring loudly if this fails)
If we change the syntax only slightly, we can fit this feature in the URL syntax, for example tcp://0.0.0.0:6000-6099 would listen somewhere in the [6000, 6099] port range. What do you think?
The addition of a port range would be awesome. I'm in the situation where I have a range of ports opened on my firewall, and I just want to use any available port in the given range.
@pitrou - looks like a good suggestion. Looks fairly similar to the iptables approach. The --http-port / --bokeh-port interface wouldn't be able to use the tcp:// form though, so would need to do both (not that I need the bokeh interface in this instance).
This would be a very useful feature! I've just hit this limitation when trying to deploy on Azure where I'm currently using a powershell script like below:
Activity
mrocklin commentedon Feb 27, 2017
Does anyone with some networking background know of a good way to ask the OS to connect to a port within a certain range?
cc @pitrou
pitrou commentedon Feb 28, 2017
@stuartarchibald, I assume you mean
--nprocs=N --start-port=Xwill bind to ports X, X+1, X+2, etc? Are you expecting a specific pattern (e.g. first all worker ports, then all Bokeh ports), or is it indifferent?mrocklin commentedon Feb 28, 2017
I suspect he's looking for something like
--port=5000:6000. Often people are told that they need to stay within a particular range of ports.stuartarchibald commentedon Mar 14, 2017
I think being able to express a port range for each component would be ideal thanks. Something like:
which would start 16 worker processes bound to free ports between 5000 and 5100 and the same with
httpbuts/5/6/g. This is with view of use cases where open ports are restricted to some particular range but some external reason requires computation to be undertaken in separate processes.mrocklin commentedon Mar 14, 2017
I see two options:
stuartarchibald commentedon Mar 14, 2017
I think either of these would be fine, the latter, with consistent and accessible complaining (for easy parsing), is probably easiest place to start?
pitrou commentedon Mar 15, 2017
If we change the syntax only slightly, we can fit this feature in the URL syntax, for example
tcp://0.0.0.0:6000-6099would listen somewhere in the [6000, 6099] port range. What do you think?pelson commentedon Apr 3, 2017
The addition of a port range would be awesome. I'm in the situation where I have a range of ports opened on my firewall, and I just want to use any available port in the given range.
@pitrou - looks like a good suggestion. Looks fairly similar to the iptables approach. The
--http-port/--bokeh-portinterface wouldn't be able to use thetcp://form though, so would need to do both (not that I need the bokeh interface in this instance).dhirschfeld commentedon Apr 9, 2017
This would be a very useful feature! I've just hit this limitation when trying to deploy on Azure where I'm currently using a powershell script like below:
...after having opened an appropriate port range.
It would be nice to simply be able to specify it at the command line like:
and have dask simply assign consecutive addresses in the range (potentially automatically skipping any already in use)
stuartarchibald commentedon Apr 27, 2017
@pitrou The suggested URL syntax form seems good to me, neat idea, also saves having custom parsers etc.
julioasotodv commentedon Feb 8, 2018
So, I believe that this has not been implemented yet, right?
The only current way to specify ports for more than one process is to actually create multiple dask-workers in one machine...
mrocklin commentedon Feb 8, 2018
julioasotodv commentedon Feb 8, 2018
Ok thanks
gdurif commentedon Nov 6, 2018
Is there any news regarding that feature ?
Thanks
stuartarchibald commentedon May 11, 2020
Thanks for implementing this @jrbourbeau!