cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1318
Views
0
Helpful
6
Replies

sticky cookie with variable cookie name

ROMAN TOMASEK
Level 1
Level 1

Hello all,

is possible to configure ACE4710 for sticky on the base of cookie name ASPSESSIONID[A-Z]. |For example ASPSESSIONIDA=server1. See following:

sticky http-cookie ASPSESSIONID[A-Z] asp
  serverfarm TEST2

policy-map type loadbalance first-match LB_1
  class URL
    serverfarm TEST1
  class URL_CZ
    sticky-serverfarm asp

- it doesn't work, because I cann't to use regular expressions in the cookie name:-(

So I tried to configure following:

sticky http-header Cookie pokus
  header offset 13 length 8
  serverfarm TEST2

policy-map type loadbalance first-match LB_1
  class URL
    serverfarm TEST1
  class URL_CZ
    sticky-serverfarm pokus

- it is better, but I am sticky on the base of the second request.:-(

So is there some solution for a variable cookie name? Thank you. Roman

1 Accepted Solution

Accepted Solutions

Gilles Dufour
Cisco Employee
Cisco Employee

No, the cookie name needs to be static....the dynamic part is the value and that's the one we can learn.

Gilles.

View solution in original post

6 Replies 6

UHansen1976
Level 1
Level 1

Hi Roman,

Have you tried configuring cookie insertion with static values?. Would look something like this:

sticky http-cookie ASPSESSIONID asp

  timeout [min]

  replicate sticky

  cookie-insert browser expire

  static cookie-value SERVER1 rserver [name of rserver]

  static cookie-value SERVER2 rserver [name of rserver]

  serverfarm TEST2

Optionally, you can specify a portnumber after the rserver-name and a backup-serverfarm after your primary serverfarm (TEST2 in your case).

Check out http://www.cisco.com/en/US/docs/app_ntwk_services/data_center_app_services/ace_appliances/vA3_1_0/configuration/slb/guide/sticky.html

hth

Hello,

I know it, but the customer wants to use a dynamic cookie from an ASP script on the server side. Thanks.

My apologies, I guess I misunderstood your question.

I've never configured stickyness based on a cookie-value that is not sourced from the ACE itself, so I really couldn't tell you if it would work. But according to the doc, the ACE can be configured to dynamically learn portion of the http-content (e.g. cookie) and provide stickyness based on this.

In my experience though, when parsing the http-header for specific content, there is one thing in particular you need to ensure. By default, the ACE only parses a certain length of the http-header (2048 bytes), so if the http-header exceeds this length, you might fail to locate the cookie value and your stickyness is lost. I've had this happen to me and the solution is to create an http-parameter-map and configure a parse-length of a higher value (e.g. 8k).

Also, I think persistence-rebalance is required, unless you only want to inspect the first requst and simply "switch" all subsequent requests to the same rserver.

hth

thank you. Roman

Gilles Dufour
Cisco Employee
Cisco Employee

No, the cookie name needs to be static....the dynamic part is the value and that's the one we can learn.

Gilles.

thank you, Gilles

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: