Skip to main content
Version: 5.0.0

Relay Mode

N|Solid Console supports running in a relay mode in order to support proxying through firewalls, buffering agent data during downtime, and scaling with complex network topologies.

The relay sits between your Runtime instances and N|Solid Console. In this mode, nsolid-console looks like an N|Solid Console instance to agents but does not have any N|Solid Console functionality enabled.

Relay Configuration

To use relay mode, set the --relay flag and the three [sockets] variables described below. These can be provided via the configuration file or as environment variables. If omitted, the defaults will be used.

Changing the NSOLID_COMMAND, NSOLID_DATA, and NSOLID_BULK variables is recommended, as those will be the ones that the relay itself listens on while it uses the NSOLID_CONSOLE_SOCKETS-* variables in order to connect to N|Solid Console.

In the simplest case, set the NSOLID_CONSOLE_SOCKETS_* variables to the same values that the related NSOLID_* variables were set to, picking different addresses for the NSOLID_CONSOLE_SOCKETS_* variables.

Environment Variables

Environment VariableDescription
NSOLID_CONSOLE_SOCKETS_COMMAND_REMOTE_ADDRThis is the route to the Console command port that the relay will use. It should be formatted as "host:port" and follows the same conventions as NSOLID_COMMAND
NSOLID_CONSOLE_SOCKETS_DATA_REMOTE_ADDRThis is the route to the Console data port that the relay will use. It should be formatted as "host:port" and follows the same conventions as NSOLID_COMMAND. Unlike NSOLID_DATA, this variable has to be specified or included in the config
NSOLID_CONSOLE_SOCKETS_BULK_REMOTE_ADDRThis is the route to the Console bulk port that the relay will use. It should be formatted as "host:port" and follows the same conventions as NSOLID_COMMAND. Unlike NSOLID_BULK, this variable has to be specified or included in the config

Configuration File

The following example shows the [sockets] section of a configuration file written to support relay mode. Note that the related Bind addresses have been changed, and an explicit public key has been specified for the remote Console server.

# config-sample.toml

[sockets]
commandBindAddr = "tcp://<console-address>:8001"
dataBindAddr = "tcp://<console-address>:8002"
bulkBindAddr = "tcp://<console-address>:8003"

commandRemoteAddr = "tcp://<console-address>:9001"
dataRemoteAddr = "tcp://<console-address>:9002"
bulkRemoteAddr = "tcp://<console-address>:9003"
remotePublicKey = "^kvy<i^qI<r{=ZDrfK4K<#NtqY+zaH:ksm/YGE6I"

Docker Compose File

Relay mode environment variables need to be added to the console section of the Docker configuration file.

For example, in order to match the settings in the above configuration file, add the following:

# docker-compose.yml

console:
environment:
- NSOLID_CONSOLE_SOCKETS_COMMAND_BIND_ADDR=console:8001
- NSOLID_CONSOLE_SOCKETS_DATA_BIND_ADDR=console:8002
- NSOLID_CONSOLE_SOCKETS_BULK_BIND_ADDR=console:8003
- NSOLID_CONSOLE_SOCKETS_COMMAND_REMOTE_ADDR=console:9001
- NSOLID_CONSOLE_SOCKETS_DATA_REMOTE_ADDR=console:9002
- NSOLID_CONSOLE_SOCKETS_BULK_REMOTE_ADDR=console:9003

See the Docker page for more information on setting up Docker Compose.