RELAYWS Environment

This server is used in Reemo’s WebSocket mode. It runs on a Swarm cluster to provide different relay containers for each connection to a container or a remote desktop.

How It Works

The RELAYWS environment is used when a client wants to deploy the Reemo infrastructure without using WebRTC to establish the connection between users and resources (desktops, containers, virtual machines, etc.).

RELAYWS relies on a WebSocket relay mechanism. For each user connection, a relay container is deployed on the fly to act as a dedicated relay.

  1. The user requests access to a resource (e.g., an RBI container).

  2. RELAYWS creates a relay container dedicated to this connection.

  3. This container acts as a WebSocket server:

    • the user connects to it,

    • the target resource (desktop, container, VM) also connects to it.

  4. The relay container then transfers packets in both directions, ensuring communication between the user and the resource.

Important

This model allows each connection to be isolated in its own container, ensuring a clear separation of traffic and improved infrastructure resilience.

An Nginx service listens on the default port HTTPS 8443, along with a Traefik service on the default port HTTPS 443.

../../_static/images/infra/relayws_fonctionnement.png

Communication

The Infra server, through the ProRelayAPI service, communicates with the Nginx service to create/delete relay containers, and with the Traefik service to validate the state of each relay container.

../../_static/images/infra/relayws_com.png

For every established communication, a relay container is created and then destroyed at the end of the session.

../../_static/images/infra/relayws_multi.png

Clustering

The RelayWS server can operate in Clustering mode. For best performance, it is recommended to use only Manager Nodes.

../../_static/images/infra/relayws_cluster.png