Product Documentation

Migrate a Single Server Deployment to a High Availability Deployment

Jul 13, 2017

You can upgrade your NetScaler MAS single server to a high availability (HA) deployment of two NetScaler MAS servers. An HA pair of NetScaler MAS servers is in active-passive mode, and both the servers will have the same configuration. This active-passive deployment type is ideal for disaster recovery.

In this type of active-passive deployment, one NetScaler MAS server is configured as the primary node and the other as the secondary node. If, for any reason, the primary node goes down, the secondary node takes over.

To migrate a NetScaler MAS single server to a high availability (HA) pair, you need to provision a new NetScaler MAS server node, configure it to the existing NetScaler MAS single server, and deploy them as a HA pair. 

localized image

Migrating a NetScaler MAS single server to an HA mode involves the following steps:

  1. Modifying the existing server node
  2. Provisioning the second server node
  3. Deploying the two nodes in HA mode
  4. Configuring the HA pair (optional)

Modifying the Existing MAS Server Node

To migrate the NetScaler MAS from single server to HA mode, you have to change the initial deployment type of the server node to HA mode.

     1.  On a workstation or laptop, open the console of the existing NetScaler MAS server node.
     2.  Log on to NetScaler MAS. The default credentials are nsroot and nsroot.
     3.  In the shell prompt, type deployment_type.py, and press enter.
     4.  Select the deployment type as NetScaler MAS server. If you do not select any option, by default, it’s deployed as a server.

localized image

     5.  The deployment console prompts you to select the server deployment (as Standalone). Enter No to confirm the deployment as HA pair.

localized image

     6.  The console prompts you to select the (first server node). Enter Yes to confirm the node as the first server node.

localized image

     7.   The console prompts you to restart the server. Enter Yes to restart.

localized image

Provisioning the Second Server Node

You have to provision the second server on your hypervisor. Use the same image file that you used to install the first server, or obtain an image file of the same version from the Citrix download site.

      1.  Import the image file to your hypervisor, and then from the Console tab configure the initial network configuration options as explained on the following screen:

localized image

     2.  After specifying the required IP addresses, select the deployment type as NetScaler MAS server. If you do not select any option, by default, it’ll be deployed as a server.

localized image

     3.   The deployment console prompts you to select the server deployment (as Standalone). Enter No to confirm the deployment as HA pair.

localized image

     4.  The console then prompts you to select the (first server node). Enter NO to confirm the node as the second server node.

localized image

     5.  Enter the first server’s IP address and password, and reboot the node when prompted by the console.

localized image

Deploying the two servers in HA mode

To complete the installation process of the two server nodes as an HA pair, you have to deploy these nodes from the GUI of the previously existing MAS server node. Internal communication between the two servers starts when you deploy the two server nodes.

     1.  In a web browser, type the IP address of the previously existing NetScaler MAS server node (for example, http://10.102.29.56).
     2.  In the User Name and Password fields, enter the administrator credentials.
     3.  On the System tab, navigate to Deployment and click Deploy.

localized image

     4.  A confirmation message appears. Click Yes.

localized image

After you deploy the NetScaler MAS in HA mode, either the first server node or the second server node can be an active node. The active node is identified by the star symbol as shown in the following figure, which shows the node at 10.102.29.23 as the active node. The other node acts as a passive node and is ready to take over as soon as the active node becomes unavailable.

localized image

Configuring Load Balancing of the NetScaler MAS HA Pair on a NetScaler Instance

You can configure the NetScaler MAS in HA mode with unified GUI access. Both the primary and secondary servers must be connected to a load balancing virtual server hosted in a NetScaler instance. The load balancing virtual server sends the requests to the primary NetScaler MAS server. The primary node accepts connections and manages all the devices.

You can access an HA node through its IP address or through the load balancing virtual server's IP address. If you use the load balancing virtual server's IP address, the GUI of the active node appears. The service state of the passive node is shown as down.

To configure the NetScaler MAS HA pair by using the command line interface:

     1.  On a workstation or laptop, open an SSH connection to the NetScaler appliance by using an SSH client, such as PuTTY.
     2.  Log on to the appliance. In User Name and Password, type the administrator credentials. The defaults are nsroot and nsroot, respectively.
     3.  At the command prompt, type:

command Copy

add lb vserver <Load Balancer name> HTTP <Vserver_ip> 80 -persistenceType SOURCEIP

add server <NMAS Server 1 name> < NMAS Server 1_ip>

add server <NMAS Server 2 name> < NMAS Server 2_ip>

add service <Service 1 name> <NMAS Server 1 name> HTTP 80 -maxReq 1

add service <Service 2 name> <NMAS Server 2 name> HTTP 80 -maxReq 1

add lb monitor MAS_Monitor TCP-ECV -send "GET /mas_health HTTP/1.1\r\nAccept-Encoding: identity\r\nUser-Agent: NetScaler-Monitor\r\nConnection: close\r\n\r\n\"" -recv "{\"statuscode\":0, \"is_passive\":0}​" -LRTM DISABLED

bind service <Service 1 name> -monitorName <Monitor name>

bind service <Service 2 name> -monitorName <Monitor name>

bind lb vserver <Load Balancer name> <Service 1 name>

bind lb vserver <Load Balancer name> <Service 2 name>

To configure the NetScaler MAS HA pair by using the NetScaler GUI:

1.  In a web browser, type the IP address of the NetScaler appliance (for example, http://192.168.100.1).
2.  In the User Name and Password fields, enter the administrator credentials.
3.  On the Configuration tab, navigate to Traffic Management > Load Balancing > Virtual Servers and select Add.
4.  Enter the name and IP address for the load balancing virtual server in the Name and IP Address fields, respectively.

Note

The IP address you enter becomes the load balancing virtual server’s virtual IP (VIP) address and can be used to access the HA pair once the configuration is complete

5.  In the Protocol field, choose the communication protocol for the load balancing virtual server.
6.  In the Port field, enter the virtual server's port number. Then, click OK.
7.  Click Persistence and select SourceIP as the persistence type.
8.  To add load balancing services for the NetScaler MAS in HA pair, select the Services and Service Groups tab, and then select Load Balancing Virtual Server Service Binding to add new services. 

localized image

Alternatively, to add a load balancing service, navigate to Traffic Management > Load Balancing > Services, and click Add.

localized image

     9.  Add the services for the first and second NetScaler MAS by clicking +, and click Bind.

localized image

     10.  Bind monitor to each service by navigating to Configuration > Traffic Management > Load Balancing > Services, edit both the services select the monitor type as tcp-ecv.

localized image

Important: If you use an external SNMP server in a NetScaler MAS HA setup, you have to configure SNMP requests to be sent to individual nodes. You will not get responses if the SNMP server is configured to send requests to the load balancing virtual server's IP address.