Load Balancing

Overview

Load balancing is required to achieve transparent redundancy in a High Availability Cluster. The following outlines considerations relating specifically to NXRM.

Ports

NXRM listens on port 8081 for HTTP by default. There is no default port for HTTPS. These ports are also configurable (see NXRM Port Configuration).

Docker Repositories

The docker client does not allow a context as part of the path to a registry, as the namespace and image name are embedded in the URLs it uses. NXRM allows custom ports to be exposed to create a listener on a root context. See  SSL and Repository Connector Configuration for more details. Alternatively you may choose to use a URL rewriting scheme to achieve the same results without needing to configure custom ports ( not covered here)Using URL rewriting allows you to sidestep this limitation, otherwise exposing and using the configured port(s) are required.

Sticky Sessions

The NXRM UI uses a cookie named NXSESSIONID to maintain a users state. The load balancer should be configured to enforce sticky sessions for requests containing this cookie.

Monitoring Node Health

NEW IN RELEASE 3.15.0

NXRM provides two endpoints you can use to check the status of your NXRM node. The Readable Health Check endpoint verifies that a node can handle read requests. The Writable Health Check endpoint verifies that a node can handle read and write requests. Since a node that can handle read requests but not write requests may still be considered serviceable, it is left to the user to decide which status endpoint to use.

These endpoints can be used by a load balancer to determine if a node should be considered to handle requests. For both status endpoints, Success is represented as HTTP 200 OK. Failure is represented as HTTP 503 SERVICE UNAVAILABLE. The nexus.log file for the node should be inspected for further details.

The URLs for the Health Check endpoints are:

NameURL
Readable Health Check http://<hostname>:<port>/service/rest/v1/status
Writable Health Check 
NEW IN RELEASE 3.16.0
http://<hostname>:<port>/service/rest/v1/status/writable

SSL Termination

NXRM can be configured to serve content using SSL (see Configuring to Serve Content via HTTPS). The recommended approach for HA-C is to use the load balancer for SSL termination as it alleviates the need to configure certificates on each NXRM node.