Gateway Service

The gateway service provides a reverse proxy so that a job can migrate from one host to another without interrupting client connections.

Feature Description

In most cases, the OpCenter is used to schedule batch jobs, that is, jobs that run without an attached terminal — results are written to a file (or files) and retrieved when the job completes. OpCenter can also deploy containers that support interactive browser-based sessions, such as is required for RStudio or Jupyter Notebooks. Each container can run on a Spot Instance in which case the OpCenter seamlessly migrates the job to a new virtual machine if the Spot Instance is reclaimed. The new virtual machine instance has a different IP address.

The gateway service provides a reverse proxy that ensures that each interactive session, for example, each RStudio session, appears to clients as an IP address that never changes even when the RStudio session moves to a different virtual machine. The gateway uses TCP port numbers to distinguish between different virtual machines.

Application

In the current release, RStudio and Jupyter Notebook servers can be connected to a gateway. For more detail on how to use RStudio with the gateway service, see the RStudio "how to" guide.

Usage

In the current release, gateways can only be managed using the CLI. Enter:
float gateway -h
for usage and options. Gateways can be created (float gateway create), destroyed (float gateway destroy), or modified (float gateway modify). Use the float gateway modify command to add or remove a security group that applies to a particular gateway.
Each gateway has an associated ID. Each server, RStudio or Jupyter Notebook, has an associated job ID. Servers are connected to gateways by using the gateway connect command:
float gateway connect -g <gw_id> -j <job_id> --targetPort <server_port>
where <gw_id> is the gateway ID, <job_id> is the job ID associated with the server, and <server_port> is the port the gateway and server use to connect.

You can disconnect a server from one gateway (use the float gateway disconnect command) and connect it to another gateway (use the float gateway connect command).

To display information about all running gateways, enter:
float gateway list
To display detailed information (including connected clients) about one running gateway, enter:
float gateway info -g <gw_id>