Wiki source code of Cluster


Show last authors
1 {{content/}}
2
3 {{info}}
4 When you install a plugin on a cluster system, the cluster connection should be active. This ensures that the plugin is transferred to all servers in the cluster and is available immediately. Otherwise, you may need to restart the servers.
5 {{/info}}
6
7 == Introduction ==
8
9 {{figure image="cluster_en.png"}}
10 UI for configuring clusters
11 {{/figure}}
12
13 {{formcycle/}} provides the option to setup a cluster network offering a hot standby failover mechanism by connection multiple {{mserver number="plural"/}} instances over a network, so that they can monitor each other and replace another server in case failure occurs. Currently, the {{mserver number="plural"/}} can be set two different modes: //Master// and //Failover//.
14
15 === Master ===
16
17 A server in this mode can be used without any restriction and provides all services. Normally, the state of this server will be //active//.
18
19 === Failover ===
20
21 A server in failover mode deactivates certain services and functions such as {{fserver/}} connections and time-based state transitions. Normally, these servers will be in the state //idle//. You can still view forms and access the [[administration interface>>Formcycle.UserInterface]].
22
23 === Failover process ===
24
25 When the network detects a failure of a server of type //master// (eg. caused by a server or network failure), the available //failover// server negotiate and designate one server as its replacement. Commonly this will be an idle //failover// server that has been part of the cluster for the longest time.
26
27 Now the designated server activates all deactivated services and attempts to establish a connection to all known {{fserver number="plural"/}} with the option //connect automatically// set. The state of this server changes to //active (failover)// and functions as a replacement for the {{mserver/}} without any restrictions.
28
29 Should the {{mserver/}} join the cluster again, it will replace the failover server, unless its cluster ID has changed. In this case, the failover server will deactivate all non-required services again and return back to the //idle// state. The {{mserver number="plural"/}}'s state changes back to the //active// state.
30
31 === Firewalls ===
32
33 In order to setup a cluster, the servers will need to be able to communicate with each other over the network. When setting up the configuration properly, this is possible even with an activated firewall. Depending on the protocol, it may be neccessary to open certain ports, especially when using UDP.
34
35 == Setup ==
36
37 {{figure image="cluster_base_en.png"}}
38 User interface for modifying basic settings
39 {{/figure}}
40
41 === Activated ===
42
43 Activates or deactivates the cluster mode of this {{mserver/}}. When the cluster mode is deactivated, all services are available and activated, but you cannot use this server as part of a cluster network and it will not be replaced by a failover server in case of failure.
44
45 === Node type ===
46
47 Sets the node type of this server, ie. either //master// or //failover//. {{mserver number="plural"/}} are active and provide all formcycle services, while failover servers are replacement servers taking over when a {{mserver/}} fails and will deactivate certain services while idle.
48
49 === Group name ===
50
51 An identifier for the cluster network. All servers that should form a network must be given the same group name.
52
53 Example: //XFC-Cluster//
54
55 === Node id ===
56
57 An identifier for the {{mserver/}}. This id must be unique within a group.
58
59 Example: //XFC-Master//
60
61 === Advanced settings ===
62
63 When advances settings are activated, more settings will be shown. Usually this is not required and you can leave these settings at their defaults, but it may be neccessary for certain special network configurations or non-standard port settings.
64
65 === Overview ===
66
67 {{figure image="cluster_overview_en.png"}}
68 Overview showing all cluster nodes within the group
69 {{/figure}}
70
71 The overview shows all servers currently part of the cluster with the current group name. Furthermore, it also shows their id, type, state, address (logical network address) and the time they joined the cluster network.
72
73 The current server you are using to display the overview will be marked in bold.
74
75 == Advanced settings ==
76
77 {{figure image="cluster_advanced_en.png"}}
78 User interface for modifying the advanced settings. This is neccessary only for special network configurations.
79 {{/figure}}
80
81 === Network protocol ===
82
83 You can change the network protocol to be used. Available options are UDP (connectionless protocol) and TCP (connection-oriented protocol).
84
85 {{info}}
86 Default option: UDP
87 {{/info}}
88
89 === Local address (network adapter) ===
90
91 Here you can set the IP address or hostname and the port of the local server to be used, ie. the bind address. Note that the provided address must match a local network adapter. If it does not match, an error message will be displayed when trying to save the options and attempting to establish a test connection to the cluster network.
92
93 Also, make sure that the entered port is opened for the chosen protocol. When entering a value of {{code language="none"}}0{{/code}} for the port, the system will attempt locate an opened port temporarily.
94
95 {{panel type="info" title="Default settings"}}
96 * Adress: <automatically located open port>
97 * Port:7600
98 {{/panel}}
99
100
101 {{panel type="info" title="Example configurations"}}
102 * Address: 192.168.0.1, port: 7600
103 * Address: fc-master.example.cde, Port: 7600
104 {{/panel}}
105
106 === Using a different external address ===
107
108 {{figure image="cluster_external_en.png"}}
109 Using a different external address
110 {{/figure}}
111
112 When you activate this switch, you can provide an alternative external IP address or hostname pointing to the same local network adapter. This may become neccessary for more complicated network topologies such as when the server is not visible directly due to a firewall. In this case, you need to provide an external address or a connection to the server cannot be established from the cluster network. Furthermore, it may be neccessary to setup the firewall properly and activate port forwarding to the server.
113
114 ==== External address ====
115
116 The external IP address or hostname and port for the server. The default is {{code language="none"}}0{{/code}}, in which case no external address and only the locale address will be used.
117
118 ==== Multicast adresse and Port (UDP only) ====
119
120 {{figure image="cluster_udp_en.png"}}
121 Using the UDP protocol
122 {{/figure}}
123
124 Here you can configure the UDP port and address for the UDP network discover, ie. for locating other servers of the cluster network. The server will send a multicast signal to the entered address and wait for other servers of the cluster network. For this to work it is neccessary that the same multicast address and port has been set for all servers that should be part of the cluster network.
125
126 IP addresses must comply to the IPv4 standard, valid addresses therefore range from 224.0.0.0 to 239.255.255.255.
127
128 When setting the port to {{code language="none"}}0{{/code}}, the server will attempt locate an open temporary port automatically.
129
130 {{panel type="info" title="Default setttings"}}
131 * Adress:228.8.8.8
132 * Port:7600
133 {{/panel}}
134
135 {{panel type="info" title="Example configuration"}}
136 * Adresse: 224.0.0.0
137 * Port:9999
138 {{/panel}}
139
140 ==== Expected nodes (TCP only) ====
141
142 {{figure image="cluster_tcp_en.png"}}
143 Using the TCP protocol
144 {{/figure}}
145
146 When using the TCP protocol it becomes neccessary to provide a list of all expected cluster servers that may be part of the network. This is because network discovery via multicasting is not possible with this protocol, so that you must enter the addresse manually.
147
148 Click the plus icon to add a new entry to the list, and the pen icon to modify an existing entry.
149
150 Servers addresses entered must conform to the following format: //<IP adress or host name>:<Port>//
151
152 Note that when using a host name instead of an IP address, the server will be ignored silently when the host name resolution fails. It is recommended therefore to use IP addresses in favor of host names.
153
154 When you are done entering the address, you must click the check mark to register this address, or the cross icon to cancel the input.
155
156 {{panel type="info" title="Example configuration"}}
157 * 192.168.0.1:7600
158 * fc-master.example.com:7600
159 {{/panel}}