ACE sticky cookie value

Unanswered Question
May 12th, 2009

Hello,

I have a following configuration:

sticky http-cookie STICKY_TMP STICKY_TMP

cookie insert ...

....

Cookies are sent and stickiness works. Everything is ok... Almost :-)

Now I have a question regarding value of cookies created by ACE.

Currently cookies have values that look like this "R4224709512"

Is it possible to change this value so it reflects the target node that processes requests for this sticky session. This cookie could contain i.e. ip address of real server.

Arrowpoint cookie on CSS1150 worked this way...

Another question. How do I identify this cookie value with sticky-entries in "show sticky database static" output?

This command doesn't show anything like R4224709512, but only numbers like 18293255029648678255

best regards

Kuba

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Gilles Dufour Tue, 05/12/2009 - 02:30

Kuba,

if you upgrade to A2(1.4) or later you will see the cookie value inside the 'show sticky database static'.

Another command was also introduced :

switch/Admin# show sticky cookie-insert group cookie-v-url

Cookie | HashKey | rserver-instance

------------+----------------------+----------------------------------------+

R3535396696 | 9130024194969063018 | linux1-80/linux1:80

R1607814347 | 10209307782784293541 | linux1-80/linux1-24:80

You can't change/set the value yourself.

Gilles.

sachinga.hcl Wed, 05/13/2009 - 03:57

I am using ACE with version A3(2.1).

The “sticky-entry” in "show sticky data static"is a hash of the cookie-value set by ACE for the real server. so you need to use "show sticky database http-cookie " to determine which server are serving the client.

ACE-1/routed(config-pmap-lb-c)# do show sticky database http-cookie

sticky group : web-sticky

type : HTTP-COOKIE

timeout : 5 timeout-activeconns : FALSE

sticky-entry rserver-instance time-to-expire flags

---------------------+----------------------+--------------+-------+

16820511103801384579 lnx1:0 0 -

sticky group : web-sticky

type : HTTP-COOKIE

timeout : 5 timeout-activeconns : FALSE

sticky-entry rserver-instance time-to-expire flags

---------------------+----------------------+--------------+-------+

3347854103021350619 lnx2:0 0 -

..sometimes they'd only show up w/ the static instead of the cookies option for some reason.

found some explanation about this:

http://docwiki.cisco.com/wiki/Session_Persistence_Using_Cookie_Learning_on_the_Cisco_Application_Control_Engine_Configuration_Example

There is a difference between inserting an ACE-generated cookie or using one learned by the ACE. The cookie-insert feature creates a static cookie.

To look at static cookies you need to use the command:

show sticky database static

if you try static cookie (cookie inserted by ACE), the value is placed in the static sticky table at the time of configuration...

so no need to send traffic, once the static sticky config is in place, you should see an entry with 'show sticky database static'.

Do not try to filter the table with some other parameters...they do not work until A2(1.4)

There are 2 database:

One for static entries and one for dynamic entries.

Every show command that does not include the static keyword will look into the dynamic database.

So, you won't see anything by using those commands.

You could perform some test to identify which cookie is sent to which server.

The cookie value is static, so the number of value is limited to the number of servers.

There is a dynamic cookie learning feature available in ACE.

Kinly tell me if you want to discuus about that.

Kindly rate if possible.

Kind regards,

Sachin garg

tech_trac Mon, 07/20/2009 - 17:27

I am currently running A2(2.0) [Build 3.0], yet I am not able to try filter on show stick database static command.

You stated "You could perform some test to identify which cookie is sent to which server." Could you please explain how to conduct that test.

I am using cookie persistence and I would like to know which cookie belongs to which rserver.

Thanks.

Syed Iftekhar Ahmed Mon, 07/20/2009 - 23:18

cookie-string command has been recently introduced in A3(2.2) code.

With cookie-string command you can define the cookie value under rserver configuration.

For example with the following config, ACE will insert cookie named "APPCookie" with value "App1server-cookie" if APP1-server is selected by ACE & "App2server-cookie" if APP2-server is selected by ACE

serverfarm host TEST-Sfarm

rserver APP1-Server 80

cookie-string "App1server-cookie"

inservice

rserver APP2-Server 80

cookie-string "App2server-cookie"

inservice

sticky http-cookie APPCookie Test-STICKY

cookie insert browser-expire

serverfarm TEST-Sfarm

Thanks

Syed Iftekhar Ahmed

Actions

This Discussion