Product Documentation

Configuring an HA Setup with a Single IP Address and a Single NIC

Feb 13, 2017

In a Microsoft Azure deployment, a high availability configuration of two NetScaler 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.

Note

For a NetScaler HA deployment on Azure cloud to work, you need a floating public IP (PIP) that can be moved between the two NetScaler HA nodes. The Azure Load Balancer (ALB) provides that floating PIP, which is moved to the second node automatically in the event of a failover.

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 VMs as a load balanced set and configure the 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 NSIP of that 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 High Availability.

Before You Begin

Note the following before you begin configuring the NetScaler 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 a VM’s default NIC. Therefore the VIP has to be configured on the VPX’s default NIC.
  • In an active-passive deployment, the Azure load balancer monitors both the primary and the secondary NetScaler VM by sending them TCP probes. These TCP probes are sent on port 9000. 

Summary of Steps to Configure NetScaler VPX in a 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

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

This article provides procedures to configure resources specific to high availability mode. For procedures to configure the other resources, see Configuring NetScaler VPX in a Standalone Mode in Azure Resource Manager.

You need to set up two NetScaler VPX instances for high availability mode. To set up a NetScaler VPX instance, see Configuring a NetScaler VPX Instance.

Configuring Internal and External Load Balancers

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

Configuring an Internal Load Balancer

  1. Click +New > Networking > Load Balancer.
  2. In 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

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 VM fails to respond to the probe for three consecutive times, the Azure load balancer will not send the traffic to the nonresponsive VM.

  1. Click All resources and search for the load balancer that you created 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

Configuring a NAT Rule on a Load Balancer

Create custom NAT rules on LB 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 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 VM 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

Configuring a Load Balancing Rule on a Load Balancer

By creating a load balancer rule, you can define a combination of a front end IP address and port, and back end IP address and port associated with VMs.

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 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 backend pool from the drop-down list
    • Probe - select the health probe from the drop-down list
  5. Click OK.

localized image

Configuring NetScaler High Availability with the Azure External Load Balancer

If your client traffic originates from the Internet, you have to deploy the external 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 load balancer. The two NetScaler VMs are in a load-balanced set that accepts client traffic from the Internet over port 15000. The Azure external 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, do one of the following:

  • For an active-passive deployment, configure the 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 the two NetScaler virtual machines.

Configuring NetScaler High Availability with the Azure Internal Load Balancer

If your client traffic originates from within the virtual network with a regional scope, you have to deploy the internal 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 load balancer. The two NetScaler virtual machines are in a load-balanced set that accepts client traffic from the Internet at port 15001. The Azure internal 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, do one of the following:

  • For an active-passive deployment, configure the 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 the two NetScaler virtual machines.

You can configure the load-balanced set only by using Azure PowerShell. 

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

In a browser’s 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 the CLI

Use any command line access tool (for example, Putty). 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 CLI by using the virtual network IP.

For information about getting started with a NetScaler appliance, see the Getting Started guide.