High Availability Installation and Configuration
Important
This feature will be supported up to Core 5.2 and will be deprecated in Core 5.5.
Introduction
High Availability enables administrators to configure Appspace to utilize a warm-standby model, where content and data are synced periodically with a standby instance of Appspace. This approach minimizes downtime and ensures a high probability of Appspace servers to be available for access at all times. Essentially, there will always be a backup of an Appspace server running in the background, ready for operation in the event of a failure from the primary server.
Important
The NLB cluster must be in unicast mode for High Availability to work.
Prerequisites
- Two prepared and fully licensed Appspace (Pro or Enterprise) instances installed on a Windows Server 2008 R2 Enterprise machine.
- For Appspace Pro, ensure that the High Availability feature is included in the license for both servers.
- At minimum, a valid Appspace Cloud Pro subscription account login to download the Appspace High Availability Tool.
- Two dedicated IP Addresses (2 GiGe NICS) for each server, with one server (virtual IP) dedicated to Network Load Balancing (NLB).
- Both servers need to be in the same sub-network and under the same domain controller:
Primary Server
Secondary Server
- One user inside the Active Directory domain that has been configured to have Logon as a service rights on the Active Directory domain:
- Both local users (on the primary and secondary server) require local administrator rights.
- Enable inbound traffic for ports 4000 and 3306 for access to the server. It is recommended that this rule be enabled for all three profiles (Domain, Private and Public):
Important
You MUST enable inbound traffic for these ports irregardless of whether the firewall is enabled or disabled.
Configuring Network Load Balancing
Note
This step will need to be executed on both primary and secondary servers.
Configuring Distributed File System Role (DFSR)
Note
This step will need to be executed on both primary and secondary servers.
Step 2
From the Add Roles Wizard window, select the File Services option, and click the Next button.
Configuring Active Directory User for Network Load Balancing
You will need to login to the server as a DOMAIN ADMIN user. This is required to add the Active Directory User to the Local Administrators. If you have an active directory user that already has the Domain Admin rights, you can skip this step.
Note
This step will need to be executed on both primary and secondary servers.
Step 1
From the Control Panel window, select the All Control Panel Items page and click on the User Accounts link.
Step 3
From the User Accounts window, select the Users tab (if not already selected) and click the Add button.
Step 4
Key in the credentials of the Active Directory user that will be used for the Appspace High Availability Service, and then click the Next button
Configuring Active Directory User for DFSR
You will need to login to the server using an Active Directory user with active Domain Admin rights, which is required to set up the DFSR. If you already have an active directory user with Domain Admin rights, you can skip this step.
Note
This step will need to be executed on the PRIMARY server only.
Step 1
Open DFS Management. A quick and easy way would be to search for the program in the search box of the Start menu.
Step 2
Right click on Replication submenu and select the Delegate Management Permission option. From the Delegate Management Permissions window, click on the Add button.
Step 3
Enter the name of the user that you will utilize for the Appspace High Availability Service in the designated textbox and click the OK button. Click Apply on the previous Delegate Management Permissions window to complete the configuration process.
Tip
You may click on the Check Names button to verify the existence of the selected user.
Configuring Windows Management Instrumentation (WMI) Permissions for DFSR
Note
This step will need to be executed on both primary and secondary server(s), and you will need to be logged in as a DOMAIN ADMIN user.
Step 1
From the All Control Panel Items page, select the Administrative Tool link and click on the Computer Management shortcut.
Step 2
Right-click on the WMI Control submenu and select the Properties option. From the WMI Control Properties window, choose the Security tab, select the MicrosoftDfs link, and click on the Security button.
Note
Add the Active Directory user to the permission list and grant the following options to the user:
- Execute Methods
- Provider Write
- Enable Account
- Remote Enable
Configuring MySQL Replication
Note
This step will need to be executed on both primary and secondary servers.
Step 1
Open the MySQL Server program. From the Administrator window, select the Startup Variables submenu and navigate to the Log files tab. In the Activate Logging section, select the Binary Logfile option and enter the phrase mysql-bin-log in the textbox provided.
Step 3
Scroll further down the Replication tab until you reach the Relay Log section, select the Relay log filename option and enter the phrase relay-log in the textbox provided and select the Relay log index option and enter the phrase relay-log-index in the textbox provided. Click the Apply changes button and restart MySQL through Service Control.
Downloading Appspace High Availability Tool
Configuring the Primary Server
Step 1
Run the installation program for the Appspace High Availability Setup. Click the Next button.
Step 4
When you reach the Service account page, enter the account name and password for the Active Directory user that has been configured in the How to: Configure Active Directory User for DFSR section. Click on the Next button.
Step 6
Next, click on the Appspace High Availability shortcut on the Windows desktop. It will auto attempt to recover the Fully Qualified Domain Name (FQDN) of the AppSpace instance.
Step 9
If you are setting up the server for the first time, this message will be displayed. Fill in all the details and click the Next button.
Note
From this point, enter the following information:
- The designated Virtual IP for the cluster
- The Subnet Mask of the Virtual IP
- The network interface to bind the Network Load Balancing (NLB) interface to
- The server role of the Appspace instance (select Primary from the dropdown menu if you are configuring the primary server)
Step 11
A summary page will be displayed once the cluster creation process is complete. Click the Configuration link.
Note
It is normal for information in the Secondary column to be blank, as the secondary instance has not yet been setup. The High Availability Service needs to be configured first, before setting up the secondary instance.
Step 12
You will be presented with the Configuration page next. The API key can be retrieved from Appspace via the ADMIN tab, in the ACCOUNT subtab, at the bottom of the page. You can proceed to configure the page with the information shown below and click the Save button once you have completed the configuration process.
Note
In the Configuration page, the following settings will be displayed:
- Heartbeat Max Tolerance Count – defines the maximum number of cycles that the Secondary server will accept before deeming the Primary server is in a state of failure.
- Heartbeat Interval – the amount of time that the Secondary server will measure to heartbeat the Primary server, represented in seconds.
- On fail detected – a dropdown menu of options to choose in the event of a confirmed Primary server failure.
- Email to Notify – specifies the option of emailing the administrator for swift notification in the event of a fail over, using the settings of your Appspace instance.
- API Key – provide the API key* for the HA tool to check the validity of the Appspace instance.
The On fail detected optionprovides a few actions for the High Availability Service to react in the event of a failure in the Primary server:
- Do nothing – No action will be taken whatsoever
- Email only – An email will be sent to the email address designated in the Email To Notify setting.
- Auto activate secondary – The secondary server will automatically be activated
- Email and auto activate secondary – Both an email will be sent and the secondary server will activated simultaneously.
Example Calculation of a Heartbeat Cycle
The total duration for a single Heartbeat cycle is calculated by multiplying the Heartbeat Max Tolerance value with the Heartbeat Interval value.
If a heartbeat max tolerance value is 10 and the heartbeat interval value is 30 seconds, the total duration for a single Heartbeat cycle will be 10*30 = 300 seconds.
A minimum duration of 300 seconds will be required for the Secondary server to decide whether the Primary server is in failure state. However, if a response to the Primary from the heartbeat sent by the Secondary is on average of 30 seconds, then it will take an extra 300 seconds for the decision to be made.
Configuring the Secondary Server
Step 1
As with the Primary server, install the High Availability Tool on the Secondary server. Run the tool by clicking the shortcut from the desktop. Key in the name of the Secondary server into the designated text box, and click the Next button to continue.
Step 2
Fill in the configuration and click Next.
Note
Enter the following information for the Secondary server:
- The Virtual IP for the cluster (same value as the Primary server)
- The Subnet Mask of the Virtual IP (same value as the Primary server)
- The network interface to bind the Network Load Balancing (NLB) interface to
- The server role of the AppSpace instance (select Secondary from the dropdown menu)
- The Primary server’s FQDN
Step 4
Once completed, the Summary page will display the details in both columns of the Primary and Secondary server instances. Reboot BOTH the Primary and Secondary servers, and wait for approximately 10 minutes for the files to be replicated across the Primary and Secondary servers.
Important
Both servers MUST be rebooted in order to complete the Appspace High Availability setup process.
Activating Failover
Note
The manual failover action is only used when the Do nothing or Email only options are selected from the On fail detected drop-down menu in the initial Primary server configuration.
Recovering from a Failover
Important
Reboot the Secondary server BEFORE attempting the recovery process on the Primary server. This is to ensure that all the necessary services on the Secondary server is up and running.
Step 1
Ensure that both of the Appspace server instances are up and running. Login into the Primary server, run the High Availability Tool, and click the Recover from Failover button. When the recovery process is complete, reboot BOTH Primary & Secondary servers to ensure that the Primary Server role is Active and the Secondary Server role is in Standby.