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

CSM and Sticky Cookie

I have a requirement to balance based on a Server supplied cookie. I have ten servers in my farm, each of which will set the SERVER= parameter in a server generated cookie to uniquely identify which server the client should be stuck to. I want the client to be stuck to the server for up to 60 minutes.

What configuration is required?

I currently have

sticky 10 cookie SERVER timeout 60

configured which seems to work. However, server administrators are reporting some users occasionally are getting stuck to the wrong server

Cisco Employee

Re: CSM and Sticky Cookie

the CSM starts counting when the connection is open [not when it's closed].

So, if you keep a connection open 60 minutes, the entry will timeout at the same time as the connection is closed.

You may want to try to increase the timeout and see if that improves the situation.

If not, you will need to capture information about all traffic from a specific client having the issue.

A sniffer trace would be best.


New Member

Re: CSM and Sticky Cookie

Salut Gilles,

You mention that "the CSM starts counting when the connection is open [not when it's closed]"... but that conflicts with what I read in the online command reference:

"...If you specify a nonzero value, the last real server that was used for a connection from a client is remembered for the sticky-time value after the end of the client's latest connection."

I need to configure sticky based on source IP and want it to timeout 2 hours after the end of the connections (not 2 hours after the start). Will I achieve this with the following?

sticky 1 netmask /32 address source timeout 120

Thanks in advance!


Cisco Employee

Re: CSM and Sticky Cookie

actually the default behavior is what I said but you can change it with the following variable :


There is an explanation @


CreatePlease to create content