Product Documentation

Managing Client Connections

Aug 31, 2016

To ensure efficient management of client connections, you can configure the content switching virtual servers on the NetScaler appliance to use the following features:

Redirecting Client Requests to a Cache

The NetScaler cache redirection feature redirects HTTP requests to a cache. You can significantly reduce the burden of responding to HTTP requests and improve your Web site performance through proper implementation of the cache redirection feature.

A cache stores frequently requested HTTP content. When you configure cache redirection on a virtual server, the NetScaler appliance sends cacheable HTTP requests to the cache and non-cacheable HTTP requests to the origin Web server. For more information on cache redirection, see "Cache Redirection."

To configure cache redirection on a virtual server by using the command line interface

At the command prompt, type:

set cs vserver <name> -cacheable <Value>

Example

set cs vserver Vserver-CS-1 -cacheable yes

To configure cache redirection on a virtual server by using the configuration utility

  1. Navigate to Traffic Management > Content Switching > Virtual Servers, and open a virtual server.
  2. In Advanced Settings, select Traffic Settings, and select Cacheable.

Enabling Delayed Cleanup of Virtual Server Connections

Under certain conditions, you can configure the down state flush setting to terminate existing connections when a service or a virtual server is marked DOWN. Terminating existing connections frees resources and in certain cases speeds recovery of overloaded load balancing setups.

To configure the down state flush setting on a virtual server by using the command line interface

At the command prompt, type:

set cs vserver <name> -downStateFlush <Value>

Example

set cs vserver Vserver-CS-1 -downStateFlush enabled

To configure the down state flush setting on a virtual server by using the configuration utility

  1. Navigate to Traffic Management > Content Switching > Virtual Servers, and open a virtual server.
  2. In Advanced Settings, select Traffic Settings, and then select Down State Flush.

Rewriting Ports and Protocols for Redirection

Virtual servers and the services that are bound to them may use different ports. When a service responds to an HTTP connection with a redirect, you may need to configure the NetScaler appliance to modify the port and the protocol to ensure that the redirection goes through successfully. You do this by enabling and configuring the redirectPortRewrite setting.

To configure HTTP redirection on a virtual server by using the command line interface

At the command prompt, type:

set cs vserver <name> -redirectPortRewrite <Value>

Example

set cs vserver Vserver-CS-1 -redirectPortRewrite enabled

To configure HTTP redirection on a virtual server by using the configuration utility

  1. Navigate to Traffic Management > Content Switching > Virtual Servers, and open a virtual server.
  2. In Advanced Settings, select Traffic Settings, and select Rewrite.

Inserting the IP Address and Port of a Virtual Server in the Request Header

If you have multiple virtual servers that communicate with different applications on the same service, you must configure the NetScaler appliance to add the IP address and port number of the appropriate virtual server to the HTTP requests that are sent to that service. This setting allows applications running on the service to identify the virtual server that sent the request.

If the primary virtual server is down and the backup virtual server is up, the configuration settings of the backup virtual server are added to the client requests. If you want the same header tag to be added, regardless of whether the requests are from the primary virtual server or backup virtual server, you must configure the required header tag on both virtual servers.

Note: This option is not supported for wildcarded virtual servers or dummy virtual servers.

To insert the IP address and port of the virtual server in the client requests by using the command line interface

At the command prompt, type:

set cs vserver <name> -insertVserverIPPort <vServerIPPORT>

Example

set cs vserver Vserver-CS-1 -insertVserverIPPort 10.201.25.136:80

To insert the IP address and port of the virtual server in the client requests by using the configuration utility

  1. Navigate to Traffic Management > Content Switching > Virtual Servers, and open a virtual server.
  2. In Advanced Settings, select Traffic Settings and, in the Virtual Server IP Port Insertion list, select VIPADDR or V6TOV4MAPPING, and specify a port header in Virtual Server IP Port Insertion Value.

Setting a Time-out Value for Idle Client Connections

You can configure a virtual server to terminate any idle client connections after a configured time-out period elapses. When you configure this setting, the NetScaler appliance waits for the time you specify and, if the client is idle after that time, it closes the client connection.

To set a time-out value for idle client connections by using the command line interface

At the command prompt, type:

set cs vserver <name> -cltTimeout <Value>

Example

set cs vserver Vserver-CS-1 -cltTimeout 100

 

To set a time-out value for idle client connections by using the configuration utility

  1. Navigate to Traffic Management > Content Switching > Virtual Servers, and open a virtual server.
  2. In Advanced Settings, select Traffic Settings, and specify a Client Idle Time-Out value.

Identifying Connections with the 4-tuple and Layer 2 Connection Parameters

You can now set the L2Conn option for a content switching virtual server. With the L2Conn option set, connections to the content switching virtual server are identified by the combination of the 4-tuple (<source IP>:<source port>::<destination IP>:<destination port>) and Layer 2 connection parameters. The Layer 2 connection parameters are the MAC address, VLAN ID, and channel ID.

To set the L2Conn option for a content switching virtual server by using the command line interface

At the command line, type the following commands to configure the L2Conn parameter for a content switching virtual server and verify the configuration:

  • set cs vserver <name> -l2Conn (ON | OFF)
  • show cs vserver <name>

Example

> set cs vserver mycsvserver -l2Conn ON 
Done 
> show cs vserver mycsvserver 
     mycsvserver (192.0.2.56:80) - HTTP   Type: CONTENT  
     State: UP 
         . . . 
         . . . 
     L2Conn: ON Case Sensitivity: ON 
         . . . 
         . . . 
Done 
> 

To set the L2Conn option for a content switching virtual server by using the configuration utility

  1. Navigate to Traffic Management > Content Switching > Virtual Servers, and open a virtual server.
  2. In Advanced Settings, select Traffic Settings, and then select Layer 2 Parameters.