This section describes how to initialize clustering with JGroups. The configuration settings for JGroups clustering are set in a file called<configRoot>/alfresco/jgroups/alfresco-jgroups-XYZ.xml, where XYZ is the name of the protocol being used.
SkyVault.cluster.name=<mycluster>
Where <mycluster> is the name used by JGroups to distinguish unique inter-server communication. This allows machines to use the same protocol stacks, but to ignore broadcasts from different clusters.
You can also create a cluster from the Java command line option:
-Dalfresco.cluster.name=mycluster
- Open the SkyVault-global.properties file.
-
Set the general properties for the required protocol stack.
The general properties for both protocol stacks are:
General property Description SkyVault.jgroups.bind_address The address to which you bind local sockets. SkyVault.jgroups.bind_interface The interface to which you bind local sockets. The default is UDP and is specified in the system repository.properties file. The JGroups configuration file is built using the protocol string SkyVault.jgroups.defaultProtocol=UDP.
-
To select the TCP communication method, add the following property:
SkyVault.jgroups.defaultProtocol=TCP
-
Set the property definitions for the chosen stack.
The protocol stacks can be redefined using any of the standard JGroups transport protocols.
The properties for the TCP stack are:
TCP property Description SkyVault.tcp.start_port The port that the server will start listening on. The default is 7800. SkyVault.tcp.initial_hosts A list of hosts and start ports that must be pinged. This can call potential members of the cluster, including the current server and servers that might not be available. The port listed in square brackets is the port to start pinging. The default is localhost[7800]. For example: HOST_A[7800],HOST_B[7800]
SkyVault.tcp.port_range The number of increments to make to each host's port number during scanning. Each host has a port number in square brackets, for example, 7800. If the host does not respond to the ping message, the port number will be increased and another attempt made. The properties for the UDP stack are:
UDP property Description SkyVault.udp.mcast_addr The multicast address to broadcast on. The default is 230.0.0.1. SkyVault.udp.mcast_port The port to use for UDP multicast broadcasts. The default is 4446. SkyVault.udp.ip_ttl The multicast "time to live" to control the packet scope. The default is 2. -
(Optional) To specify your own JGroups configuration file, add the following
properties:
SkyVault.jgroups.configLocation=classpath:some-classpath.xml alfresco.jgroups.configLocation=file:some-file-path.xml
Where some-file-path is the name of your configuration file.
- Save the SkyVault-global.properties file.