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

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

sticky cookie with variable cookie name

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

Everyone's tags (3)
1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: sticky cookie with variable cookie name

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

Gilles.

6 REPLIES
Bronze

Re: sticky cookie with variable cookie name

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

New Member

Re: sticky cookie with variable cookie name

Hello,

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

Bronze

Re: sticky cookie with variable cookie name

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

New Member

Re: sticky cookie with variable cookie name

thank you. Roman

Cisco Employee

Re: sticky cookie with variable cookie name

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

Gilles.

New Member

Re: sticky cookie with variable cookie name

thank you, Gilles

866
Views
0
Helpful
6
Replies