This article describes how to set the timeout value for the COOKIEINSERT persistence on a NetScaler appliance.
When the Load Balancing feature of a NetScaler appliance is configured and the COOKIEINSERT persistence is configured, the timeout setting becomes a configurable option. In most scenarios, a timeout of 0 is preferred.
After COOKIEINSERT persistence is configured on a virtual server of the appliance, the appliance inserts an HTTP cookie in the client responses, which is then used to maintain a persistent session to the backend server. The appliance can send either an HTTP cookie version 0 or an HTTP cookie version 1. By default, the appliance sends an HTTP cookie version 0.
When session cookies are used with a timeout value of 0, no expiry time is specified by the appliance regardless of the HTTP cookie version used. The session cookie expires when the Web browser is closed. Using session cookies enables COOKIEINSERT to function correctly even if the time on the NetScaler appliance and the servers are not synchronized. The expiry time is client software implementation dependent, and usually such cookies expire when the software is properly closed.
This persistence type does not use any system resources. Therefore, the appliance can accommodate an unlimited number of persistent clients.
Note: If the client computer is not allowed to store the HTTP cookie, the subsequent requests do not have the HTTP cookie. As a result, persistence is not used.
On a NetScaler appliance, persistence is maintained for a configured period of time, depending on the persistence type. Use the –timeout <Minutes> option with the add lb vserver or set lb vserver commands on the command line interface of the appliance to configure the persistence timeout in minutes.
add lb vserver vs1 http 1.1.1.1 80 -persistencetype cookieINSERT -timeout 60
Orset lb vserver vs1 -timeout 200
The default value for the –timeout option is 2 minutes and the maximum value is 1440 minutes or 1 day.
In the details pane, select the virtual server for which persistence must be configured (for example, vserver-LB-1), and click Open.
In the Configure Virtual Server (Load Balancing) dialog box, on the Method and Persistence tab, in the Persistence list, select COOKIEINSERT.
In the Time-out (min) text box, type the time-out value (for example, 2).
Click OK.
Ensure that the virtual server for which persistence is configured correctly by selecting the virtual server and viewing the Details section at the bottom of the pane.
Citrix recommends that when configuring the COOKIEINSERT persistence as the Load Balancing method on the NetScaler appliance, you must use the session cookie with a timeout value of 0.
Note: If you have configured persistence on the appliance, the persistence settings override the server selection that Load Balancing methods made.
For Configuration Utility Changes for NetScaler 10.1, refer Citrix eDocs - Configuration Utility Changes.