Last updated on May 20, 2015

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.

Network Topology

Configuring Network Load Balancing

Note

This step will need to be executed on both primary and secondary servers.

Step 1

From the Server Manager window, click the Add Features link from the Features submenu.

Step 2

From the Add Features Wizard window, select the Network Load Balancing option, and click the Next button.

Step 3

Click on the Install button. The Network Load Balancing feature will now be installed on the respective servers.

Configuring Distributed File System Role (DFSR)

Note

This step will need to be executed on both primary and secondary servers.

Step 1

From the Server Manager window, click the Add Roles link from the Roles submenu.

Step 2

From the Add Roles Wizard window, select the File Services option, and click the Next button.

Step 3

Click the Next button in the File Services introduction page.

Step 4

Select the Distributed File System option in the Role Services page, and click the Next button.

Step 5

Select the option to Create a namespace later using the DFS Management snap-in in Server Manager in the DFS Namespace page, and click the Next button. The Install button will be enabled. Click on it to complete the installation process.

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 2

Click on the Manage 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

Step 5

Select the Administrator option and click on the Finish button to complete the configuration.

Step 6

A new user will be added to the User Accounts.

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 2

Navigate to the Replication tab, locate the General section and select Server Id option.

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

Step 1

Login to Appspace Cloud. Click the Extension Dropdown icon and select My Team.

Step 2

Select Downloads tab. Check Appspace HA Tool then Download icon and save the installer file in a location where it can be installed later on the primary and secondary servers.

Configuring the Primary Server

Step 1

Run the installation program for the Appspace High Availability Setup. Click the Next button.

Step 2

Click Next to accept license agreement.

Step 3

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 5

Click Install to proceed.

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.

../../../../_images/06h.png

Step 7

Click the Next button.

Step 8

Please allow some time while the tool connects to the Appspace High Availability Service.

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 10

Please allow some time for the new cluster to be created.

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 3

Please allow some time for the process to be completed.

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.

Step 1

In the event of a Primary server failure, login into the Secondary server, run the High Availability Tool and click the Activate Failover button.

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.