Introduction / FirstSpirit ServerManager / Server properties / Clustering

Clustering

 

In this case, clustering means load balancing for generating projects on additional FirstSpirit servers (“horizontal scalability”).

For information on the concept and a description of the architecture, see Clustering - load distribution on generation.

Starting with FirstSpirit version Available from FirstSpirit Version 2024.7, clustering has undergone a comprehensive revision. The focus was on significantly simplifying the configuration and eliminating the use of shared file systems (see configuration up to 2024.6).

Important Master and slave servers must be on the same network.

Available from FirstSpirit Version 2024.7 New Configuration

A shared file system between the master and the cluster nodes is no longer strictly required, but it remains optionally possible.

To support cluster nodes, no configuration is required on the Master. The Master only indicates which cluster nodes are currently connected, including their current status.

The button "Deregister slave" serves exclusively the purpose of removing information about cluster nodes that were previously connected to the master.

Also in the ServerMonitoring under “FirstSpirit / Clustering”, the information about the current cluster nodes is available.

Configuration of a cluster node

To start a cluster node, the regular FirstSpirit installer can be used. It is only necessary to add the following parameters to the fs-wrapper.isolated.conf file:

wrapper.java.additional.1=-Dregistry.file=ClusterNode.properties
wrapper.java.additional.2=-Dfirstspirit.host=<Hostname of the master server>
wrapper.java.additional.3=-Dfirstspirit.port=<SOCKET Port of the master server>

When the cluster server starts, it will automatically connect to the master server and then execute the corresponding tasks.

In addition to the wrapper configuration, there are a number of other parameters that can alternatively be set via environment variables. Most of them are optional. Only the three parameters mentioned above are mandatory for a cluster node. There is also a new server configuration parameter, which is also optional. The default value should usually be suitable.

Overview of all possible parameters:

EnvironmentJavaServer-ConfDescription
FS_CLUSTER_SCHEDULER cluster.slaveSchedulerScheduler strategy, with which the master distributes tasks to the slaves. Possible values:

  • LeastTasks (default)
  • LeastLoad
  • RoundRobin

    
FS_NODE_UUIDfs.node.uuid UUID of the node (master or slave) Optional, otherwise assigned randomly.
    
FS_NODE_HOSTfs.node.host Hostname of the node (Slave) Optional, will be determined automatically otherwise.
    
FS_HOSTfirstspirit.host Hostname of the master Connection parameter for the slave.
    
FS_PORTfirstspirit.port Port of the master
Connection parameter for the slave.
    
FS_ENCRYPTIONfirstspirit.encryption Encryption
Default value: 2 = ChaCha20
Connection parameter for the slave.
    
FS_COMPRESSIONfirstspirit.compression Compression
Default value: 4 = Zstd
Connection parameter for the slave.
    
FS_PASSWORDfirstspirit.password Application password
Default value is the internal default password.
Connection parameter for the slave.
    
FS_SSL_*fs.ssl.* If TLS is used, various optional keystore parameters are utilized.
Connection parameter for the slave.
    
FS_CLUSTER_SYNCfs.cluster.sync Schedule config and log synchronization from slaves to master
Default value: true
If the same shared volume is used for master and slaves, a sync is unnecessary and the parameter can be set to false.
    
FS_TOMCAT_URL  External Tomcat URL
Is only used during the first server startup for the configuration of the web server.
    
FS_INTERNAL_TOMCAT_URL  Internal Tomcat URL
Used only during the first server start to configure the web server.
    
FS_TOMCAT_USERNAME  Tomcat Manager user
Used only during the first server start to configure the web server.
    
FS_TOMCAT_PASSWORD  Tomcat Manager password
Used only during the first server start to configure the web server.
    
FS_WRAPPER_CONF  Wrapper Configuration used for startup.
The slaves use fs-wrapper.isolated.slave.conf, the master uses fs-wrapper.isolated.conf (default).
    
FS_REGISTRY_FILEregistry.file FactoryRegistry configuration
E.g., ClusterNode.properties, when a slave is to be started. Usually does not need to be set, can alternatively be used instead of wrapper configuration.
    
FS_SERVER_LIB  Path to the server jar
Used by the docker container's entry point and usually does not need to be set manually.
    
FS_JAVA_HOME  Java Home path
Is used by the entry point of the docker container and usually does not need to be set manually.
    

 

If masters and slaves use a common file system (optional), the parameter should be set to prevent the unnecessary synchronization and copying of log and configuration files.

-Dfs.cluster.sync=false

Synchronization and copying of log and configuration files will no longer be performed, as this is unnecessary in this case.

A FirstSpirit server can be registered as a master or slave server for operation in a cluster group in the “Clustering” area.

Important Mixed Operation Not Possible in Cluster Environments:
Mixed operation of isolated servers and legacy servers (see Module development "Isolated" (→Isolated Mode Guide)) is not permitted in a cluster group. This means that an isolated master server cannot be operated in a group with a legacy slave server (or vice versa), for example.

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.7 | Data privacy