Product Documentation

Configuring NetScaler VPX in High Availability Mode in Azure Resource Manager (ARM)

May 20, 2016

In a Microsoft Azure Resource Manager (ARM) deployment, a high availability configuration of two NetScaler VPX virtual machines is achieved by using the Azure load balancer, which distributes the client traffic across the virtual servers configured on both the NetScaler instances. Two types of Azure load balancers are available for high availability:

  • Azure external load balancer: If the client traffic originates from the Internet, you have to deploy the external load balancer between the Internet and the NetScaler VPX instances to distribute client traffic.
  • Azure internal load balancer: If the client traffic originates from within the virtual network, or is forwarded by a gateway or firewall within the virtual network, you have to deploy the internal load balancer to distribute client traffic. 

To achieve high availability on Azure, you must add the two NetScaler virtual machines as a load balanced set and configure the network security group (NSG).

When two NetScaler VPX instances are configured in active-active mode, both instances must have the same configuration. The client traffic is distributed across the virtual servers in both the instances by the Azure load balancer. The VIP addresses in both the instances are different and should match the NetScaler IP (NSIP) address of that NetScaler VPX instance.

The active-passive mode provides failover capability. In this mode, the VPX instances synchronize their configuration states. When the primary instance fails, the secondary instance takes over.

For information about high availability in NetScaler appliance, see http://docs.citrix.com/en-us/netscaler/11/system/high-availability-introduction.html

Before You Begin

Note the following before you begin configuring the NetScaler VPX instances in high availability mode in the Azure virtual network.

  • The two NetScaler virtual machines that you want to add to a load balanced set should be provisioned in the same virtual network.
  • A load balanced set applies only to the default NIC of the virtual instance. Therefore, the VIP has to be configured on the default NIC of the NetScaler VPX.
  • In an active-passive deployment, the Azure load balancer monitors both the primary and the secondary NetScaler virtual machine by sending them TCP probes. These TCP probes are sent on port 9000. 

Summary of Tasks to Configure NetScaler VPX in a High Availability Mode

The following list provides a summary of tasks that you have to perform to configure NetScaler VPX in high availability mode.  

  1. Configure a resource group
  2. Configure a network security group
  3. Configure virtual network and its subnets
  4. Configure a storage account
  5. Configure an availability set
  6. Configure a NetScaler VPX instance
  7. Configure internal and external load balancers
  8. Configure health probes
  9. Configure backend pools
  10. Configure NAT rules
  11. Configure load balancing rules

Note

The first six tasks are common for configuring NetScaler VPX in both standalone and in high availability mode. To perform these common tasks, see Configuring NetScaler VPX in Standalone Mode. The steps required to perform the tasks specific to high availability deployment are provided here.

After configuring all the resources, you can configure the virtual machines in high availability mode with either an external load balancer or with an internal load balancer.

Configuring Internal and External Load Balancers

Create an Azure load balancer to use the load balancing features of ARM to distribute traffic between virtual machines that are part of the same virtual network. The load balancing features of Azure load balancer can load balance level 4 traffic, and support only TCP and UDP traffic. 

Configuring an Azure Internal Load Balancer

  1. Click +New > Networking > Load Balancer.
  2. On the Create load balancer pane, enter the following details:
    • Name of the load balancer
    • Scheme - select Internal to configure an internal load balancer
    • Virtual network - select the newly created virtual network from the drop-down list
    • Subnet - select the associated subnet
    • IP address assignment - select Static
    • Private IP address - assign a private IP address for the internal load balancer
    • Resource group - select the newly created resource group from the drop-down list
  3. Click Create.
localized image
localized image

Configuring an External Load Balancer

  1. To create an external load balancer, follow similar steps as creating an internal load balancer with the following differences:
    • Schema - select Public
    • Public IP address - assign a public IP address to the external load balancer
  2. Click Create.
localized image

Configuring a Health Probe on a Load Balancer

Create custom TCP or HTTP probes to monitor the health of the various server instances. When the virtual machine fails to respond to the probe for three consecutive times, the Azure load balancer will not send the traffic to the nonresponsive virtual machine.

  1. Click All resources, and search for the load balancer that you created in the previous task by typing the name in the search box.
  2. In the Settings pane, click Probes.
localized image

3.  Click +Add and in the Add probe pane, enter the following details:

  • Name of the health probe
  • Protocol - select TCP
  • Port - type 9000
  • Set the Interval and Unhealthy threshold limits

4.  Click OK.

localized image

Configuring a Backend Pool on a Load Balancer

Create backend pools, that is, a pool of IP addresses associated with the virtual machine Network Interface Cards (NIC) to which the load is distributed.

  1. Click All resources and search for the load balancer that you have created by typing the name in the search box.
  2. In the Settings pane, select Backend pools.
  3. Click +Add, and in the Add backend pool pane, enter the following details:
    • Name of the backend pool
    • Availability set - select the availability set created earlier
    • Virtual machines - select the NetScaler VPX instances that are in high availability deployment. Press <Ctrl> to select multiple instances.
  4. Click OK.
localized image
localized image

Configuring a NAT Rule on a Load Balancer

Create custom NAT rules on the Azure load balancer to define the inbound traffic flowing through the front-end IP address and distributed to the back-end IP address. Make sure that no two NAT rules has the combination of same service, same source port, and same target port.

Note

A front-end IP address is the external IP address on the load balancer that faces the incoming traffic, and a back-end IP address is the virtual machine facing IP address that receives the traffic from the load balancer.

  1. Click All resources, and search for the load balancer that you have created by typing the name in the search box.
  2. In the Settings pane, select Inbound NAT rules.
  3. Click +Add, and in the Add inbound NAT rule pane, add a NAT rule for each type of request. You can add multiple NAT rules.
  4. Enter the following details, and then click OK.
    • Name of the rule
    • Service - select the required service from the drop-down list
    • Port - type the correct port number
    • Target - select the NetScaler VPX that will be the target of this rule
    • Target port - the target port is automatically populated depending on the service selected

Note

Citrix recommends TCP services for the NetScaler VPX VM on port 9000.

localized image
localized image

Configuring a Load Balancing Rule on a Load Balancer

By creating a load balancer rule on Azure load balancer, you can define a combination of a front-end IP address and port, and back-end IP address and port associated with virtual machines.

For example, create a rule so that all HTTP requests coming on the public IP will be forwarded to the availability set on their port 80.

  1. Click All resources, and search for the Azure load balancer that you have created by typing the name in the search box.
  2. In the Settings pane, select Load balancing rules.
  3. Click +Add, and in the Add load balancing rules pane, create load balancing rules for each type of incoming network traffic.
  4. Enter the following details:
    • Name of the rule
    • Protocol - select the protocol
    • Port - type the port number based on the port selected
    • Backend pool - select the back-end pool from the drop-down list
    • Probe - select the health probe from the drop-down list
  5. Click OK.
localized image
localized image

Configuring NetScaler High Availability with the Azure External Load Balancer

For client traffic originating from Internet, you have to deploy an external Azure load balancer to create a high availability configuration of NetScaler virtual machines in a load-balanced set.

The following figure shows how high availability is achieved in active-active mode by using the external Azure load balancer. The two NetScaler virtual machines are in a load-balanced set that accepts client traffic from the Internet over port 15000. The external Azure load balancer load balances these client requests between the two virtual machines.

localized image

Before you begin configuring the load-balanced set through the Azure portal, perform one of the following tasks:

  • For an active-passive deployment, configure NetScaler virtual machines as primary and secondary nodes by using the following command: add ha node <ID> <IP address>.
  • For an active-active deployment, configure the required services on both NetScaler virtual machines.

Configuring NetScaler High Availability with the Azure Internal Load Balancer

If your client traffic originating from within the virtual network with a regional scope, deploy an internal Azure load balancer to achieve high availability of NetScaler virtual machines added to a load-balanced set.

The following figure shows how high availability is achieved in an active-active mode by using the internal Azure load balancer. The two NetScaler virtual machines are in a load-balanced set that accepts client traffic from the Internet at port 15001. The internal Azure load balancer load balances these client requests between the two virtual machines.

localized image

Before you begin configuring the load-balanced set by using Azure PowerShell, perform one of the following tasks:

  • For an active-passive deployment, configure NetScaler virtual machines as primary and secondary nodes by using the following command: add ha node <ID> <IP address>.
  • For an active-active deployment, configure the required services on both NetScaler virtual machines.

You can configure a load-balanced set by using PowerShell commands alone.

Accessing the NetScaler VPX Virtual Machine

You can access the NetScaler instance either through its graphical user interface (GUI) or through the command line interface (CLI). You can use the PIP to access the NetScaler virtual machine instance.

To log on to the virtual machine, use your username and password specified while creating the virtual machine.

You can change the password after you log on to the instance.

To access the NetScaler instance through the GUI

Open a browser and in the address field, type the virtual network public IP address provided by Azure during virtual machine provisioning, or type the PIP address.

Note

Make sure you have created NSG inbound or outbound rules to allow access to the private port 80 or 443 when accessing the GUI by using the virtual network IP.

To access the NetScaler instance through command line

Use any command line access tool (for example, Putty) to access NetScaler instance through the command line. Specify either the virtual network public IP address provided by Azure during NetScaler VPX provisioning, or specify the PIP address. Use SSH protocol with port 22.

Note

Make sure that you have created NSG inbound or outbound rules to allow access to private port 22 when accessing the commnad line by using the virtual network IP.

For information about getting started with a NetScaler appliance, see http://docs.citrix.com/en-us/netscaler/11.html.