Skip to content

Distributed Non-Public Workers and Girder API URL #1766

Description

@BryonLewis

This is an issue regarding DIVE with a combination of localworkers (new in Girder 5) and remote workers that can't use the same publicly facing URL for communication with the base girder api URL (api/v1)

There are some deployments of DIVE that have the server within it's own non-public network (think VPC). This has the localworker and the server within the same network system (maybe docker compose) but could have workers within the same VPC but on a slightly different network.

Background:
When a task is initiated within Girder/DIVE it embeds the api url so the task can properly download files and report back the status of the job. This is set during the creation of the job by the server. So you would either set the GIRDER_SETTING_WORKER_API_URL to http://girder:8080/api/v1 (the internal IP address behind docker) or to the public facing address like https://viame.kitware.com/api/v1` as long as the system has access to a public URL.

With Girder 5 there is now a local worker that is used to offload long running tasks like deletion or asset store imports and that is typically located at the same location of the server. DIVE also has workers used to do transcoding (CPU worker) or used to run inference or training (GPU workers).

Issue:
If your server doesn't have a loopback for the public IP address and you have remote workers they either need some network way to access the same API_URL. I.E a server using docker at 192.168.0.2 that has the GIRDER_SETTING_WORKER_API_URL set to http://girder:8080/api/v1 would work for the local worker. If the remote worker for transcoding was on a different machine within the same network (192.168.0.3) it wouldn't know where http://girder:8080/api/v1 is. You would think you could set the GIRDER_SETTING_WORKER_API_URL to http:/192.168.0.2:8010/api/v1 but then the local worker wouldn't know the IP without some IP table re-routing to make sure that inside the docker network 192.268.0.2 points to girder:8080.

Solution:
I'm working within the core girder repo to add an environment variable override to individual workers that will replace the Server's set api_url with an environment variable. So if the server tells the remote worker at 192.168.0.3 that the api url is http://girder:8080/api/v1 this environment variable will replace it with http://192.168.0.2:8010/api/v1 making it easier for remote workers that don't have a looback reference.

@smwoodman - tagging for reference to an issue that was discussed through email.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions