Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Can CSS route based on cookie info in HTTP request


I am new to CSS and am interested as it might be able to provide a solution to a problem I have seen.

We currently have 3 Windows Servers running an ASP-based web application with a clustered SQL Server backend. The front end uses windows load balancing to distribute the load. All 3 servers are configured the same and there is only one application.

The problem lies with the way an the application maintains session state. I am told it uses a non-persistant cookie on the client which corresponds to a session object on the server. This is opposed to maintaining state in central location such as the database. Obviously this means the client needs to be stuck to a particular server for that session. This is currently achieved by setting the Windows NLB to single affinity which places traffic from a particular IP address to the same server. This does work but the clients source IP is changed by a downstream firewall to a NAT overload address meaning all clients appear with the same IP address (different port) and hence always end up on just one server.

The obvious next step in my mind would be to change the way NAT is done but this is not possible. The next obvious idea would be to change the application so that it maintains state in the database so the affinity of the Windows NLB could be disabled meaning requests would be dealt with using the source IP and port and hence distributed evenly. I am told this cannot be done either :) Joy!

So I have begain to look at other possible solutions. Apologies for my very limited knowledge on the CSS as I am trying to get my head around how it can be configured. I am thinking that it may be able to help me if I used it instead of Windows NLB. I am interested in the way you can use Layer 5 stickiness. Would it be able to examine the cookie in the HTTP request and route the traffic to the correct server?

I am aware that this will not alleviate the failover issue. If one of the servers were to fall over then the client would have to login again, however I am under the impression that this is acceptable behaviour. The main driver here is to provide load balancing to improve application performance by using all resources opposed to just one.

Many many thanks to anyone who can give me advise on this.

Cisco Employee

Re: Can CSS route based on cookie info in HTTP request

The CSS does not have the ability to learn dynamic cookies, but you can use it to solve your problem.

There are 2 options.

1/ you let the CSS insert it's own cookie in the server data. For the client this is transparent. The client will use the cookie as if it was sent by the server and the CSS can use it for stickyness.

Here is a link to a sample config

2/ the next option is if you want to use the server cookie. Once again, the CSS can't learn these cookies. But it can detect the cookie and find a specific static string to decide which server to use.


New Member

Re: Can CSS route based on cookie info in HTTP request

Hi Gilles

Thanks for the info. Sounds like we are on the right path. Unfortunately I am unable to get much information from the developers. Long story. I did logon to the system whilst doing a network trace. The following is what I found in the HTTP header:

Hypertext Transfer Protocol

GET /XXXXX/Includes/style.asp HTTP/1.1\r\n

Accept: */*\r\n


Accept-Language: en-gb\r\n

Accept-Encoding: gzip, deflate\r\n

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)\r\n

Host: xxxx.xxxxx.xxxxx\r\n

Connection: Keep-Alive\r\n



Why do you configure 2 services? How would I go about this given the cookie in the HTTP request?

Many thanks


Cisco Employee

Re: Can CSS route based on cookie info in HTTP request


I think arrowpoint cookie would be easier in your case.

Here is the link I forgot in my previous post.