Configure features to protect the load balancing configuration

You can configure URL redirection to provide notifications of virtual server malfunctions, and you can configure backup virtual servers to take over if a primary virtual server becomes unavailable.

Configure URL redirection

You can configure a redirect URL to communicate the status of the appliance in the event that a virtual server of type HTTP or HTTPS is down or disabled. This URL can be a local or remote link. The appliance 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.

Note: 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. In this case, a redirect is used when both the primary and backup virtual servers are down.

To configure a virtual server to redirect client requests to a URL by using the CLI

At the command prompt, type the following commands to configure a virtual server to redirect client requests to a URL and verify the configuration:

  • <set lb vserver <name> -redirectURL <URL>

  • <show lb vserver <name>

    Example

    ``` pre codeblock

    set lb vserver vserver-LB-1 -redirectURL http://www.newdomain.com/mysite/maintenance Done show lb vserver vserver-LB-1 vserver-LB-1 (10.102.29.60:80) - HTTP Type: ADDRESS State: DOWN Last state change was at Wed Jun 17 08:56:34 2009 (+666 ms) . . . Redirect URL: http://www.newdomain.com/mysite/maintenance . . . Done

    ```

To configure a virtual server to redirect client requests to a URL by using the GUI

  1. <Navigate to Traffic Management > Load Balancing > Virtual Servers.
  2. <In the details pane, select the virtual server for which you want to configure URL redirection (for example, vserver-LB-1), and then click Open.
  3. <In the Configure Virtual Server (Load Balancing) dialog box, on the Advanced tab, in the Redirect URL text box, type the URL (for example, http://www.newdomain.com/mysite/maintenance), and then click OK.
  4. <Verify that the redirect URL you configured for the server appears in the Details section at the bottom of the pane.

Configure backup virtual servers

If the primary virtual server is down or disabled, the appliance can direct the connections or client requests to a backup virtual server that forwards the client traffic to the services. The appliance 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.

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 a cascaded backup virtual server. The maximum depth of cascading backup virtual servers is 10. The appliance searches for a backup virtual server that is up and accesses that virtual server to deliver the content.

You can configure URL redirection on the primary for use when the primary and the backup virtual servers are down or have reached their thresholds for handling requests.

Note: If no backup virtual server exists, an error message appears, unless the virtual server is configured with a redirect URL. If both a backup virtual server and a redirect URL are configured, the backup virtual server takes precedence.

To configure a backup virtual server by using the CLI

At the command prompt, type the following commands to configure a backup server and verify the configuration:

  • <set lb vserver <name> [-backupVserver <string>]

  • <show lb vserver <name>

    Example

    ``` pre codeblock

    set lb vserver vserver-LB-1 -backupVserver vserver-LB-2 Done show lb vserver vserver-LB-1 vserver-LB-1 (10.102.29.60:80) - HTTP Type: ADDRESS State: DOWN Last state change was at Wed Jun 17 08:56:34 2009 (+661 ms) . . . Backup: vserver-LB-2 . . . Done

    ```

To set up a backup virtual server by using the GUI

  1. <Navigate to Traffic Management > Load Balancing > 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. <In the Configure Virtual Server (Load Balancing) dialog box, on the Advanced tab, in the Backup Virtual Server list, select the backup virtual server (for example, vserver-LB-2, and then click OK.
  4. <Verify that the backup virtual server you configured appears in the Details section at the bottom of the pane. Note: 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.

Configure features to protect the load balancing configuration