How do I setup cookie based persistence on NetScaler?

How do I setup cookie based persistence on NetScaler?

book

Article ID: CTX205266

calendar_today

Updated On:

Description

A HTTP cookie, is a small piece of data sent from a web/app server and stored in the user's web browser while the user is browsing it. Every time the user accesses same website, the browser sends the cookie back to the server to notify user's previous activity. 
 

When NetScaler does load balancing, requests are sent to backend servers based on load balancing policy. In pure load balancing we do not care of user’s session and thus the request can be sent to any backend server. While most of the Apps require user association today and they track user activity too, for which you can use persistency on NetScaler. Configuring persistence will route all connections from the same user/client to the same service, such as an application that includes a shopping cart or that handles banking transactions.
 

Choosing COOKIEINSERT as the persistence method enables NetScaler to insert a cookie into server responses, which it uses to track which server the user session belongs to. COOKIEINSERT persistence on NetScaler comes very handy when the backend App infrastructure cannot define a cookie of its own. In such cases NetScaler while acting as a proxy can demonstrate persistence behaviour for the App. A backup persistence also can be configured, which takes effect if the COOKIEINSERT persistence fails.
 

Example: Cookie based persistence might fail due to client behaviour, where client sends the second request (no cookie) even before getting the response for the first request. There could be many more scenarios.


Instructions

  1. In the process of creating virtual servers (of type HTTP/SSL) after configuring the Basic settings under Advanced settings tab click on the Persistence.
    User-added image

  2. Select COOKIEINSERT. Configure Backup Persistence which is optional
    User-added image
    If the Virtual server is already created, Edit the virtual server and follow the above steps.

To configure persistence from Command line Interface

At the command prompt, type:

Set lb vserver <name> -persistenceType COOKIEINSERT

Example:
User-added image

 

Issue/Introduction

How do I setup cookie based persistence on NetScaler?