HA Cluster (Advanced)

Introduction

To install Relution in a high availability configuration, you have the option to set up a cluster. In this cluster, multiple Relution instances (application nodes) are started, all connecting to the same database. A load balancer must distribute traffic to these nodes using the round-robin method.

Prerequisites

To establish a cluster, all Relution instances must reside in the same network. The nodes should be able to communicate with each other via their hostnames and TCP port 7800. For more information, please refer to the network requirements.

All Relution instances should use the same configuration files (e.g., application.yml) or the same environment variables. The only exception is when the hostname cannot be determined, in which case the EXTERNAL_IP environment variable can be used to set the IP address for the instance through which other Relution instances can access it.

Functionality

When a Relution instance is started, it connects to the database and writes its hostname into the JGROUPSPING table. Subsequently, all entries from the table are loaded, and the instance establishes a connection to other instances through TCP port 7800. The state of the cluster is regularly monitored via the database table. If an instance becomes unreachable, its entries are removed from the database.

Checking Cluster Status

There are various ways to verify the status of the cluster.

1. System Portal

For a clustered environment, we recommend enabling the System Portal. The System Portal provides an overview of registered nodes in the cluster. Full functionality requires communication between the nodes via port 8099.

System Portal Node Overview

2. Metric Endpoint

You can check the counter_cluster_size_total metric by accessing the API endpoint for Prometheus at https://127.0.0.1:8099/actuator/prometheus. This metric indicates how many nodes are successfully registered in the cluster.