Workers on private network, scheduler on a different network - how to make "gather" step work?

Thank you for your replies!

Given that the network communication flow is a black box, anything is possible ;).
Once a connection is established from the worker side, the scheduler and workers can communicate in both directions (TCP). However, once the connection is dropped, the scheduler has no way to contact the workers.

Does anyone know how the communication in Dask works (in the form of an Alice ↔ Bob graph)?

I had a look at the gateway proxy code - in theory, if there is a way to keep the connections until the cluster is shut down, this issue can be fixed.

I’ve also started reading up on a related solution for a different system: the HTCondor Connection Broker:

Short version: Provide a server with 1 open port and it will establish connections between nodes that cannot talk to each other otherwise. TCP magic.