> For the complete documentation index, see [llms.txt](https://gsfcorp.gitbook.io/macula/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gsfcorp.gitbook.io/macula/administration-guide-v1.33.0/configure-failover-clusters.md).

# Configure Failover Clusters

In order to create a functioning failover cluster, you need to:

* have a set of pre-created servers to act as main recording servers and failover nodes for those
* create a cluster itself as described below
* add recording and failover servers to the cluster (at least one of each type)

#### Create Cluster

You can access the configuration dialog box by first selecting the *Configuration* section and then choosing Fail*over cluster*s in the menu on the left.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FN4xhEI7osVeK8111oFsV%2Fimage.png?alt=media&amp;token=5307b141-f142-48c1-b0ec-3d3ddd8d249b" alt=""><figcaption></figcaption></figure>

Click the *+ Create failover cluster* button on the upper panel to open the cluster editing dialog box. Enter a name for the target cluster and click *OK* to save and close the dialog box. The failover cluster thus created will appear in the item list.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2F5BidnZtM0KvQ3lV4lVDH%2Fimage.png?alt=media&amp;token=380fde0e-e355-4418-866b-c99eb320c7c5" alt=""><figcaption></figcaption></figure>

Click the *Edit* button on the upper panel or double-click an item in the list to change the cluster title; use the *Delete* button with the recycle bin icon to remove items from the list. To select multiple items, use CTRL or Shift buttons on the keyboard.

#### Manage the Cluster

Click the *View servers* button on the upper panel to switch to the *Servers* view. The path in the navigation bar will indicate that you are now inside a cluster; as a result, all the changes made to the servers here will concern the target cluster only.

For a newly created cluster, the server list will be empty. Use the *Add server* button on the upper panel to add existing servers to this failover group.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FHaZoSQ301KpR0ekc9HUG%2Fimage.png?alt=media&amp;token=408027c9-621c-428d-a5aa-560ab084858a" alt=""><figcaption></figcaption></figure>

In the item list, servers currently running on their own will have empty field in the *Failover Server* column; servers currently being down and replaced by acting failover nodes will have failover server name in the same column.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2F4QXRwAcJQm5ypwbzm6mC%2Fimage.png?alt=media&amp;token=191cd83e-57b4-482d-89fd-3aeb0bb1fd0e" alt=""><figcaption></figcaption></figure>

The failover node is picked automatically; click the *Change failover server* button on the upper panel to engage another failover node in place of the one currently operating. To attempt to resume the operation of the main recording server, select *none*.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FOD6mP7Yo45smPtEzpoq1%2Fimage.png?alt=media&amp;token=ae2d7518-bc12-4d58-a856-ee75e623c044" alt=""><figcaption></figcaption></figure>

Upper panel control offers the following management options:

* *Add Server:* open the list of all available servers and select some to become part of the target cluster
* *Remove Server*: remove server from the cluster; this button will NOT delete the server itself from system configuration
* *X*: deselect items

#### Server Settings for Failover Clusters

Each server belonging to a cluster has a number of settings related to failover. These are: server role (recording/failover), assigned failover cluster, connection timeouts.

Double-click any server to bring up the server configuration dialog box. First, enable or disable failover node mode for any server via the *Details* tab and then the *Roles* section: servers marked as failover nodes will not accept any device configuration.

{% hint style="danger" %}
You cannot make a server act as a failover node if it has an active device configuration currently assigned to it. Remove all device configurations from the server to make the server available for failover role.
{% endhint %}

{% hint style="info" %}
In the same section, you have an option to apply a VCA license to the target server, either recording or failover. You need to apply a separate VCA license to each failover node in a cluster in case you want these servers to take over VCA configuration of a failed recording server as well. (Detailed information about VCA licensing and settings can be found in the VCA documentation).
{% endhint %}

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FB9ocMoCVT3QMJpAxRCi0%2Fimage.png?alt=media&amp;token=08e46040-6925-413a-a728-c12c051d2e99" alt=""><figcaption></figcaption></figure>

Switch to the *Failover* tab to change failover cluster attachment and timeout values for the target server.

* Failover cluster: a failover cluster for the target server to belong to
* Current failover server\*: (automatic value) shows, which failover node is currently acting instead of the target recording server
* Failover timeout\*: the time for the target recording server to be unavailable (offline or down) for it to be automatically replaced by a failover node
* Central server connection timeout: the time for the target server to wait for the central server connection upon startup; after the timeout, the server will start with the last received configuration and will continue attempting to reach the central server
* Auto recovery\*: if enabled, the failed recording server will automatically resume operation after coming back online, thus replacing the failover node
* Recovery timeout\*: if auto recovery is enabled, this value defines the time in seconds to wait before the recording server automatically resumes its normal operation

\*Settings marked with an \* (asterisk) above only refer to regular recording servers without the failover node role

{% hint style="info" %}
Starting from Macula version 1.7.0, there exists an option of automatic recording server recovery but it is disabled by default. Up to version 1.7.0, the returning a recording server back to operation can be only done manually, via failover cluster management as described above.
{% endhint %}

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FpcsH4OcYqSAuDYPfir22%2Fimage.png?alt=media&amp;token=9972c477-3030-4897-87f3-e57e0e979a76" alt=""><figcaption></figcaption></figure>

Once you have put at least one recording server and one failover node into the same failover cluster, the Macula failover mechanism will ensure that, if the recording server fails to respond for the specified time, its configuration will be assigned to the failover server. If there is more than one failover node in a cluster, a faulty failover server will be consequently replaced by the next idle failover node.
