Migrate a Single-Server Deployment to a High Availability Deployment

You can upgrade your NetScaler MAS single server to a high availability (HA) deployment of two NetScaler MAS servers. When an HA pair of NetScaler MAS servers is in active-passive mode, both the servers 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 perform the following steps:

  • provision a new NetScaler MAS server node
  • configure it to the existing NetScaler MAS single server
  • 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 NetScaler 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 NetScaler MAS server node

To provision the second server on your hypervisor, use the same image file that you used to install the first server. You can also 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 is 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, deploy these nodes from the GUI of the first server node that you configured. Internal communication between the two servers starts when you deploy the first server node.

  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. In the following figure, the 10.102.29.53 node is shown as the active node. The other node acts as a passive node and is ready to take over when the active node becomes unavailable.

localized image

Configuring load balancing on the HA pair

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:

add lb vserver <load_balancer_name> HTTP <vserver_ip> 80 -persistenceType SOURCEIP

add server <MAS_server_1_name> <MAS_server_1_ip>

add server <MAS_server_2_name> <MAS_server_2_ip>

add service <service_1_name> <MAS_server_1_name> HTTP 80 -maxReq 1

add service <service_2_name> <MAS_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.

    Note

    The IP address you enter becomes the load balancing virtual server’s virtual IP (VIP) address. You can then use the VIP address 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. 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 and select the monitor type as tcp-ecv.

    Important:

    You can SNMP requests to be sent to individual nodes. But, you should use an external SNMP server in a NetScaler MAS HA setup. There are no responses if the SNMP server is configured to send requests to the load balancing virtual server’s IP address.