Product Documentation

Custom server ID persistence

In the Custom Server ID persistence method, the Server ID specified in the client request is used to maintain persistence. For this type of persistence to work, you must first set a server ID on the services. The Citrix ADC appliance checks the URL of the client request and connects to the server associated with the specified server ID. The service provider should make sure that the users are aware of the server IDs to be provided in their requests for specific services.

For example, if your site provides different types of data, such as images, text, and multimedia, from different servers, you can assign each server a server ID. On the Citrix ADC appliance, you specify those server IDs for the corresponding services, and you configure custom server ID persistence on the corresponding load balancing virtual server. When sending a request, the client inserts the server ID into the URL indicating the required type of data.

To configure custom server ID persistence:

  • In your load balancing setup, assign a server ID to each service for which you want to use the user-defined server ID to maintain persistence. Alphanumeric server IDs are allowed.
  • Specify rules, in the default-syntax expression language, to examine the URL queries for the server ID and forward traffic to the corresponding server.
  • Configure custom server ID persistence.

Note: The persistence time-out value does not affect the Custom Server ID persistence type. There is no limit on the maximum number of persistent clients because this persistence type does not store any client information.

Example:

In a load balancing setup with two services, assign server ID 2345-photo-56789 to Service-1, and server ID 2345-drawing-abb123 to Service-2. Bind these services to a virtual server named Web11.

set service Service-1 10.102.29.5 -CustomServerID 2345-photo-56789

set service Service-2 10.102.29.6 -CustomServerID 2345-drawing-abb123

On virtual server Web11, enable Custom Server ID persistence.

Create the following expression so that all URL queries containing the string “sid=” are examined.

HTTP.REQ.URL.AFTER_STR(“sid=”)

Example:

set lb vserver Web11 -persistenceType customserverID -rule "HTTP.REQ.URL.AFTER_STR("sid=")"

bind lb vserver Web11 Service-[1-2]

When a client sends a request with the following URL to the IP address of Web11, the appliance directs the request to Service-2 and honors persistence.

Example:

http://www.example.com/index.asp?&sid=2345-drawing-abb123

For more information about default-syntax policy expressions, see the Policy Configuration and Reference.

To configure custom server ID persistence by using the configuration utility

  1. Navigate to Traffic Management > Load Balancing > Services.
  2. Open the service and set a server ID.
  3. Navigate to Traffic Management > Load Balancing > Virtual Servers, and open the virtual server.
  4. In Advanced Settings, select Persistence.
  5. Select CUSTOMESERVERID, and specify an expression.

Custom server ID persistence