ACE: Stickyness, Cookie in URL

Unanswered Question
Aug 3rd, 2009

Hello,


I have a problem with cookies in the URL if the browser does not support Cookies in the http header.


I'm setting the cookie in the url static , so the URL looks like:


http://testfarm/sticky.cgi?serverid=1.1.1.1


And configure the sticky group:


sticky http-cookie serverid sticky-farm cookie secondary serverid

replicate sticky

serverfarm sticky-farmm 8 static cookie-value "1.1.1.1" rserver server1

16 static cookie-value "1.1.1.2" rserver server2



What's wrong with my configuration?

If the client accepts cookies in the Cookie header anything works but not if the client rejects the cookie.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Gilles Dufour Mon, 08/03/2009 - 02:09

Did you define a port for each server inside the serverfarm ?

If yes, you need to specify this port in the static entries.


Gilles.

Sbutzek Mon, 08/03/2009 - 03:00

Hi Gilles,


no, i did not specify a port in the serverfarm or in the realserver.


The configuration looks like this:


sticky http-cookie serverid ST-sticky-farm

cookie secondary serverid

replicate sticky

serverfarm sticky-farm

8 static cookie-value "1.1.1.1" rserver server1

16 static cookie-value "1.1.1.2" rserver server2




policy-map type loadbalance first-match L7-10-1-1-1

class class-default

sticky-serverfarm sticky-farm


policy-map multi-match L4_SLB_POL_external

description L4 Policy fuer SLB ohne NAT

class V-10-1-1-1

loadbalance vip inservice

loadbalance policy L7-10-1-1-1

loadbalance vip icmp-reply active

appl-parameter http advanced-options HTTP-rebalance


class-map match-any V-10-1-1-1

2 match virtual-address 10.1.1.1 tcp eq www


serverfarm host sticky-farm

probe tcp80-i30

rserver server1

inservice

rserver server2

inservice


rserver host server1

ip address 1.1.1.1

inservice

rserver host server2

ip address 1.1.1.2

inservice



Sven

Gilles Dufour Mon, 08/03/2009 - 03:48

Sven,


I tested your config in my lab and it works for me.

I used version A2(1.4)


What version do you run ?


Gilles.

Sbutzek Mon, 08/03/2009 - 03:53

Gilles,


I've used A2(1.4)a,

how did you test the Configuration?



Sven

Gilles Dufour Mon, 08/03/2009 - 03:57

Sent the following request 10 times:

GET /index.html?serverid=1.1.1.1&session_id=1234 HTTP/1.1

Host: 10.86.213.27

x-value: 12345

Accept: */*

Accept-Charset: *

Accept-Language: *

Connection: Keep-Alive


Then did a show serverfarm


switch/Admin# sho serverfarm linux4

serverfarm : linux4, type: HOST

total rservers : 2

---------------------------------

----------connections-----------

real weight state current total failures

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

rserver: linux1-24

192.168.30.24:0 8 OPERATIONAL 0 1 0

rserver: linux4

192.168.30.44:0 8 OPERATIONAL 0 11 0



And all entries appear on server linux4 as configured.


sticky http-cookie serverid CookieLinux4

cookie secondary serverid

8 static cookie-value "1.1.1.1" rserver linux4

16 static cookie-value "1.1.1.2" rserver linux1-24

serverfarm linux4



Gilles

Sbutzek Tue, 08/04/2009 - 03:32

Hi Gilles,


we are both right, i think i know the problem.


I've first configured a sicky group without the support for cookies inside the URL:


1)

sticky http-cookie serverid ST-sticky-farm

replicate sticky

serverfarm sticky-farm

8 static cookie-value "1.1.1.1" rserver server1

16 static cookie-value "1.1.1.2" rserver server2


Then i added the support for url cookies


2)

sticky http-cookie serverid ST-sticky-farm

cookie secondary serverid


This is not working unless i change the policy-map:


3)

policy-map type loadbalance first-match L7-10-1-1-1

class class-default

no sticky-serverfarm sticky-farm

sticky-serverfarm sticky-farm



I don't think this works as described in the docs.



Sven


Gilles Dufour Tue, 08/04/2009 - 06:03

CSCsw96035 secondary cookie not sticked if added after adding sticky to LB policy


This was identified earlier this year but we haven't assign an engineer to it yet.

I'll make sure this is done.


G.

Actions

This Discussion