Cluster Operation: Setting up the Messaging System

If Cadenza Web is operated in a cluster (e.g. several Cadenza instances behind a load balancer), it is necessary to use the Cadenza messaging system.This ensures that after changes to central elements such as object types and data sources in the Management Center, all other Cadenza instances always show the latest data.

Configuration and Prerequisites (Overview)

To ensure secure communication between Cadenza instances, the following requirements must be met:

  • At least three Cadenza instances must be configured.

  • An odd number of Cadenza instances must always be operated as the target state.

  • All Cadenza instances must be accessible to each other via the network topology.

  • In addition to the network port for HTTP traffic (e.g. 8443, 433, 80 or 8080), two additional ports must be enabled or set up specifically for communication with the messaging system (messaging port and discovery port).

  • At least one TLS certificate must be provided in a Java Key Store (jks). To simplify deployment, it is also possible to operate all Cadenza instances in the cluster with the same TLS certificate.

  • All public certificates of the other Cadenza instances in the cluster must be available in a Java Trust Store (jks).

  • If necessary, the host names or IP addresses of the other Cadenza instances in the cluster must be known.

Configuration in Cadenza:

  • For each instance, the plugin Message Broker (Message_Broker) must be activated and the corresponding configuration file messagebroker-config.xml must be adapted.

Optional:

  • The messaging system can be taken into account during logging.

During operation:

  • Instances that have received the status UNHEALTHY must be reinserted into the cluster.

Activate Plugin and Adapt Configuration File

For each Cadenza instance, the Message Broker plugin (Message_Broker) must be activated and the corresponding configuration file messagebroker-config.xml must be adapted. See the messagebroker config file reference for details.

Status UNHEALTHY - Add Instances Back to the Cluster

If one or more Cadenza instances lose the connection to the other instances active in the cluster, the subset of instances on the Prometheus status endpoint becomes UNHEALTHY. In this case, all Cadenza instances no longer display the latest data.

To add instances with the UNHEALTHY status back to the cluster, they must be restarted. Make sure that this is mapped automatically by health checks of the deployment infrastructure and that the load balancer automatically recognizes when the instances are available again and forwards requests accordingly.

Include messaging system when logging

Debug messages can be generated in the log file to support troubleshooting. To do this, the following two loggers must be added to the configuration file <cadenza_home>\CadenzaWeb\webapps\cadenza\WEB-INF\classes\log4j2.xml:

<Logger name="net.disy.cadenza.message.broker.ignite" level="debug" />
<Logger name="org.apache.ignite" level="debug" />