Product Documentation

SureConnect environments

The following topics describe SureConnect environments.

Primary and alternate servers

The SureConnect environment uses a dedicated server to provide alternate content when the requested content is not available. The alternate content may include an alternate page, plus optional components such as frame set, organization logo, and so on. The alternate and primary servers can be the same server.

You can configure SureConnect to display a progress bar when the requested content is not available (or the progress bar and an alternate page).

The following figure illustrates the SureConnect environment.

Figure 1. SureConnect - Primary and Alternate Servers

SureConnect - Primary and Alternate Servers

Configuration checklist

Complete the following checklist before you start configuration:

  • The same builds are running for the appliance and for the SureConnect files as suggested by appliance staff.
    • Appliance Build Number: ________

    • SureConnect (sc_xx.exe) Build Number: _______

  • The latest SureConnect files (style files) are extracted to:

    • All primary servers (required for NS action.
    • The alternate content server (required for ACS action).
  • All customizations to the latest style and vsr.htm files are applied.

  • The alternate content server is accessible from the Internet (required for ACS action).

  • If the -redirectURL URL argument of the add vserver CLI command needs to be specified:

    • The URL is up and running.
    • This URL is not on the configured servers.
    • This URL does not match any content in the vserver (that is, do not redirect a missing URL to itself). Redirecting a missing URL to itself can send some browsers into an infinite loop.
  • All URLs to be configured for SureConnect are top-level URLs only. (Only the URLs that occupy the whole window or frame can be configured, not the embedded objects).

Following are the steps to configure SureConnect in a setup with a primary server and a dedicated alternate server:

  • Enable the SureConnect feature
  • Add the SureConnect policy
  • Bind the SureConnect policy

You can optionally configure the following:

  • Redirect the client to another URL if the primary server fails, or send a customized response to the client if the alternate server fails.
  • If the servers do not provide alternate content, send a default or customized response.

Redirect the client to another URL

  1. Enable the SureConnect feature.

  2. Define the primary server and its service.

    You must identify the original server for which SureConnect support is being configured. At the Citrix ADC command prompt, type the following command:

    add service <serviceName> <IP> HTTP <port>
    

    where <serviceName> assigns a name for the service; <IP> is the server’s IP address; and <port> is the port number that the service will use.

    Repeat use of the add service CLI command for each service that is to be added.

    You can also configure SureConnect on a load balancing virtual server. At the Citrix ADC command prompt, type the following command:

    add vserver <name> HTTP <IP> <port>
    
  3. Define and bind the SureConnect policy as follows. If you are configuring a rule-based policy, perform this step as described in “Configure wildcard rule-based policies.” To configure a URL-based policy, at the Citrix ADC command prompt, type the following command:

    add sc policy <name> [-url <URL>] [-delay <microsec>] [-maxConn <positiveInteger>]
    

    For a detailed description of the add sc policy command, see “[Command Reference]https://developer-docs.citrix.com/projects/netscaler-command-reference/en/latest/.”

    To bind the SureConnect policy, at the Citrix ADC command prompt, type the following command:

    bind service <serviceName> -policyname <string>
    

    where <serviceName> is the name of the service defined in step 2, and <string> is the name of the SureConnect policy.

    Repeat the bind service command for each policy created.

    You must include the alternate content page in the altContSvcName argument, and in the altContPath argument of the add sc policy command.

    In the following example, the name of the alternate content file is /Citrix ADC system /barandpage.htm, and this file resides in svc2.

  4. To save the configuration, at the netscaler command prompt, type the following command:

    save config
    

Example configurations

The following examples illustrate various SureConnect configurations.

The examples assume that monitoring of physical services is enabled. If the alternate system is down, SureConnect will deliver the alternate content from the system itself.

Example 1 - SureConnect progress bar and alternate page

You can configure SureConnect to display both the progress bar and an alternate page to the user.

To bind a SureConnect policy to a load balancing virtual server, at the command prompt, type the following commands:

bind lb vserver <virtualServerName> -policyName <string>

where <virtualServerName> is the name of the load balancing virtual server defined in step 2 of the configuration process, and <string> is the name of the SureConnect policy defined in step 3.

Figure 2. SureConnect Configuration - Example 1

SureConnect Configuration - Example 1

At the Citrix ADC command prompt, type the following commands:

enable feature SC
show ns info
add service svc2 192.2.3.6 HTTP 9002
show server
show service svc2
add service svc9 192.2.3.5 HTTP 8002
add sc policy policy8 -url /cgi-bin/slow.asp
-delay 3000000 -action ACS svc2 /netscaler 9000 system barandpage.htm
bind service svc9 -policyname policy8
set service svc9 -sc ON
save config

After you configure SureConnect, you can enter commands that show information to verify what you have configured.

Example 2 - SureConnect progress bar only

In this example, SureConnect will display only the progress bar. The server orgsrvr with IP address 10.101.8.187 has service orgsvc. This server is connected to the appliance. The service is bound to the appliance. The progressbar.htm file specifies that only the progress bar will be displayed.

At the Citrix ADC command prompt, type the following commands:

enable feature SC
add service orgsvc 10.101.3.187 HTTP 80
add sc policy policy9 -url /cgi-bin/slow.asp
-delay 4000000 -action ACS orgsvc /netscaler 9000 system / progressbar.htm
bind service orgsvc -policyname policy9
set service orgsvc -sc ON
save config

Example 3 - SureConnect with load balancing

This example illustrates how to configure the load balancing feature so that SureConnect will display alternate contents from the primary server. For information about load balancing, see Load Balancing.

In this example, two physical servers with IP 10.101.3.187 and 10.101.3.188 are being load balanced by the appliance. The name and location of the alternate page file is specified in the file alternatepage.htm, which resides on both servers.

The appliance has one configured virtual server address: 10.101.3.201. At the Citrix ADC command prompt, type the following commands:

enable feature SC LB
add service psvc1 10.101.3.187 HTTP 80
add service psvc2 10.101.3.188 HTTP 80
add vserver vs-SureC HTTP 10.101.3.201 80
bind lb vserver vs-SureC psvc1
bind lb vserver vs-SureC psvc2
add sc policy policy9 -url /cgi-bin/slow.asp -delay 4000000
-action ACS vs-SureC /netscaler system /alternatepage.htm
bind lb vserver vs-SureC -policyName policy9
set lb vserver vs-SureC -sc ON
save config

Example 4 - SureConnect with load balancing (ACS action)

This example illustrates how to configure the Citrix ADC appliance load balancing feature so that SureConnect will display alternate content from the alternate server. For information about load balancing, see Load Balancing.

In this case, there are two physical servers, IP 10.101.3.187 and 10.101.3.188. Both are being load balanced by the appliance.

The name and location of the alternate page file are specified in file barandpage.htm, which resides on a third server not being load balanced.

The third server’s IP address is 10.101.3.189. Because barandpage.htm is specified, the progress bar and alternate page will both be displayed.

The appliance has one configured virtual server “vsvr” whose IP address (Virtual Server) is 10.101.3.200.

At the Citrix ADC command prompt, type the following commands:

enable feature SC LB
add service psvc1 10.101.3.187 HTTP 80
add service psvc2 10.101.3.188 HTTP 80
add service alt-cont-svc 10.101.3.189 HTTP 80
add vserver vsvr HTTP 10.101.3.200 80
bind lb vserver vsvr psvc1
bind lb vserver vsvr psvc2
add sc policy policy10 -url /cgi-bin/slow.asp
-delay 4000000 -action ACS alt-cont-svc
/netscaler 9000 system /barandpage.htm
bind lb vserver vsvr -policyName policy10
set lb vserver vsvr -sc ON
save config

Example 5 - SureConnect with content switching

This example illustrates how to configure SureConnect where the Citrix ADC content switching and load balancing features are being used. SureConnect is configured on a load balancing virtual server bound to a content switching virtual server.

The alternate content is distributed under the content switching virtual server according to the content switching rules. For more information about load balancing and content switching, see “Load Balancing” and “Content Switching.”

In this case, three physical services with IP addresses 10.100.100.104, 10.100.100.105, and 10.100.100.106 are bound to three load balancing virtual servers with IP addresses 10.100.100.101, 10.100.100.102, and 10.100.100.103. These three load balancing virtual servers are bound to a content switching virtual server with IP address 10.100.100.100.

In this setup, lbvip1 contains .cgi content, lbvip2 contains .gif content, and .lbvip3 contains .html content.

The name and location of the alternate page file is specified in the file alternatepage.htm, which resides on lbvip3. The embedded objects in this file must be distributed according to the content switching rules (any embedded gif will reside on lbvip2, any embedded htm will reside on lbvip3, and so on).

Figure 3. SureConnect Configuration - Example 5

SureConnect Configuration - Example 5

At the Citrix ADC command prompt, type the following commands:

enable feature CS LB SC
add vserver cswvip HTTP 10.100.100.100 80 -type CONTENT
add vserver lbvip1 HTTP 10.100.100.101 80 -type ADDRESS
add vserver lbvip2 HTTP 10.100.100.102 80 -type ADDRESS
add vserver lbvip3 HTTP 10.100.100.103 80 -type ADDRESS
add service psvc1 10.100.100.104 HTTP 80
add service psvc2 10.100.100.105 HTTP 80
add service psvc3 10.100.100.106 HTTP 80
bind lb vserver lbvip1 psvc1
bind lb vserver lbvip2 psvc2
bind lb vserver lbvip3 psvc3
add cs policy CSWpolicy1 -url /*.cgi
bind cs vserver cswvip lbvip1 -policyName CSWpolicy1
add cs policy CSWpolicy2 -url /*.gif
bind cs vserver cswvip lbvip2 -policyName CSWpolicy2
add cs policy CSWpolicy3 -url /*.htm
bind cs vserver cswvip lbvip3 -policyName CSWpolicy3
add sc policy SCpol -url /cgi-bin/delay.cgi -delay 4000000 -action ACS cswvip /alternatepage.htm
bind lb vserver lbvip1 -policyName SCpol
set lb vserver lbvip1 -sc ON
save config

SureConnect environments