If you are installing a self-managed cluster, the clients need to have direct access to each node in the cluster, including the node DNS name and IP address. A Remote Services Router provides a point of contact for all clients and will route the communication to the appropriate node in the cluster, thus allowing you to isolate your cluster from its clients. A Remote Services Router acts as a reverse proxy. Behind a router, the cluster nodes can use private DNS names or IP addresses as long as all of the nodes and the router can communicate together. Only the router must be accessible from the clients.
The router can use either HTTP or HTTPS to communicate with clients, and similarly it can choose either to route traffic to cluster nodes. It is a common to enable HTTPS between the clients and the router, while having the router and the nodes communicate over unencrypted HTTP in a private network. Using this setup only requires you to manage certificates on the router.
You can get more information about the router (grb_rsr) by reading the command-line help:
The router uses a configuration file grb_rsr.cnf that must be placed in the same directory as the grb_rsr executable. A predefined configuration file with additional comments is provided. The following command lists the available configuration properties:
Similarly to grb_rs, the router can be started as a service and log messages will be stored in the
grbrsr-service.log rotating file by default. Log messages will also be sent to the
syslog on macOS and Linux,
and to the service event log on Windows.
Here are some examples of how you might refer to a router using a URL (using HTTP or HTTPS, with the standard port or a custom port):
http://router.mycompany.com http://router.mycompany.com:61001 https://router.mycompany.com https://router.mycompany.com:61001
When using the command-line tools grbcluster or gurobi_cl, you can first log in with a router. The router address will be saved in your license file in the ROUTER property so that you can run other commands without needing to specify it again:
> grbcluster login --server=http://server1:61000 --router=http://router.mycompany.com info : Using client license file '/home/jones/gurobi.lic' Enter password (return to use default): info : Connected to node http://server1:61000 via router http://router.mycompany.com > grbcluster nodes ID ADDRESS STATUS TYPE LICENSE PROCESSING #Q #R JL IDLE %MEM %CPU b7d037db https://server1:61000 ALIVE COMPUTE VALID ACCEPTING 0 0 10 <1s 66.58 7.97 eb07fe16 https://server2:61000 ALIVE COMPUTE VALID ACCEPTING 0 0 1 <1s 66.58 9.62
For the clients using the Gurobi Optimizer API, you will need to either set the ROUTER property in the license file or construct an empty environment and set the CSRouter parameter before starting the environment.
For clients using the cluster REST API for monitoring purpose, you will need to use the router URL instead of a node address, and you can pass the selected node address in the header X-GUROBI-SERVER. In this way, the client communicates with the router and the router will use the header value to forward the request to the selected node. In case the node address is incorrect or does not exist, the router will return the HTTP error code 502.