Networking
The algorithm container is deployed in an isolated network to prevent it from reaching unwanted destinations. There are two exceptions:
When the VPN feature is enabled on the server all algorithm containers are able to reach each other using an
ip
andport
.The central server is reachable through a local proxy service. In the algorithm you can use the
HOST
,POST
andAPI_PATH
to find the address of the server.
VPN connection
Algorithm containers can expose one or more ports. These ports can then be used by other algorithm containers to exchange data. The infrastructure uses the Dockerfile from which the algorithm has been build to determine to which ports are used by the algorithm. This is done by using the EXPOSE
and LABEL
directives.
For example when an algorithm uses two ports, one port for communication com
and one port for data exchange data
. The following block should be added to you algorithm Dockerfile:
Port 8888
and 8889
are the internal ports to which the algorithm container listens. When another container want to communicate with this container it can retrieve the IP and external port from the central server by using the result_id
and the label of the port you want to use (com
or data
in this case)
Last updated
Was this helpful?