A Load Balancer such as the Citrix NetScaler has monitors built in, to automatically redirect Client requests to the back-end servers that are up and running. But, what happens if the front-end is down? Load Balancing can fail when a Virtual Server or Vserver fails, or when the VIP is unable to handle excessive traffic. Protecting the LB setup against failure helps ensure the availablility of the websites and applications.

Configuring a Backup Load Balancing Virtual Server

If the primary virtual server is marked down or disabled, the NetScaler directs the connections or client requests to a backup virtual server that forwards the client traffic to the services. It can also send a notification message to the client regarding the site outage or maintenance. The backup virtual server is a proxy and is transparent to the client. If a load balancing virtual server is configured with both a backup virtual server and a redirect URL, the backup virtual server takes precedence over the redirect URL. A redirect is used when the primary and backup virtual servers are down. You can configure a backup virtual server when you create a virtual server, or when you change the optional parameters of an existing virtual server. You can also configure a backup virtual server for an existing backup virtual server, thus creating cascaded backup virtual servers. The maximum depth of cascading backup virtual servers is 10.

If you have multiple virtual servers that connect to two servers, you have a choice of which virtual server takes over if the primary virtual server goes down and then comes back up. The default behavior is for the primary virtual server to resume its role as the primary. However, you may want to designate the backup virtual server to remain in control in the event that it takes over. For example, you may want to sync updates to the backup server to the primary server and then manually force the original primary server to resume its role. In this case, you can designate the backup virtual server to remain in control in the event that the primary virtual server goes down.

If the backup virtual server does not exist, an error message appears. You can use redirect URL on the primary when the primary and the backup virtual servers are down or have reached their threshold for handling requests. When a service bound to the virtual server is in an out of service state, use the redirect URL on the virtual server.

To set a backup virtual server by using the NetScaler command line

At the NetScaler command prompt, type:

  • set lb vserver <vServerName> -backupVserver <BackupVServerName> [-disablePrimaryOnDown]
    If you enable the Disable Primary When Down option, the backup virtual server maintains control after the primary virtual server comes up. To enable the primary virtual server to retake control, you must manually re-enable it.

Example

set lb vserver Vserver-LB-1 -backupVserver Vserver-LB-2 -disablePrimaryOnDown

To set a backup virtual server by using the GUI configuration utility

  1. In the navigation pane, expand Load Balancing, and then click Virtual Servers.
  2. In the details pane, select the virtual server for which you want to configure the backup virtual server (for example, Vserver-LB-1), and then click Open.
  3. On the Advanced tab, in the Backup Virtual Server list, select the backup virtual server (for example, Vserver-LB-2).
  4. If the primary server goes down and then comes back up, and you want the backup virtual server to function as the primary server until you explicitly reestablish the primary virtual server, select the Disable Primary When Down check box.
  5. Click OK.




    Detailed instructions can be found in the NetScaler Traffic Management Guide




    NetScaler Documentation can be found here




    Download the Citrix Load Balancer




    The Citrix Community is powerful!