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.

Redirecting Client Requests to an Alternate URL

You can configure a redirect URL to communicate the status of the NetScaler in the event that a virtual server (only of type HTTP or HTTPS) is down or disabled. This URL can be a local or remote link. The NetScaler uses HTTP 302 redirect. Redirects can be absolute URLs or relative URLs. If the configured redirect URL contains an absolute URL, the HTTP redirect is sent to the configured location, regardless of the URL specified in the incoming HTTP request. If the configured redirect URL contains only the domain name (relative URL), the HTTP redirect is sent to a location after appending the incoming URL to the domain configured in the redirect URL.

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.

To configure a virtual server to redirect the client request to a URL by using the NetScaler command line

At the NetScaler command prompt, type:

  • set lb vserver <vServerName> -redirectURL <URLValue>

Example

set lb vserver Vserver-LB-1 -redirectURL http:<span class="code-comment">//www.newdomain.com/mysite/maintenance</span>

To configure a virtual server to redirect the client request to a URL 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 redirect URL (for example, Vserver-LB-1), and then click Open.
  3. On the Advanced tab, in the Redirect URL text box, type the URL (for example, http://www.newdomain.com/mysite/maintenance).
  4. 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!