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

Sticky behavior


I am planning to make a implement LB design with URI based load balalncing with 2 Serverfarms. Like if http://urla it goes to Serverfarm A and if URI is http://urlb then it goes Serverfarm B.

1) This URI will not be displayed in address bar, this will be HTTP GET requests -  Will it work if we place Layer 7 policeis, i hope so?

2) this URI will be genrated whenever user selects some model in drop down box , means depending on the selection it has to go to Serverfarm A or B- But we do have IP Sticky (as Application requires IP sticky) - So now the question would be , How ACE will work in this design, Like If User goes to Serverfarm A and made sticky and if he selects soemthing else which needs to goto Serverfarm B- WIll ACE break the session?

Cisco Employee

Sticky behavior

Hi Syakshanulla,

Regarding your first question yes you can loadbalance traffic on the basis of http content.

Regarding the sticky and tow different URL's that need to go to different serverfarms you can do like this:

create a policy type load balance first match in which CLIENT coming with  URL1 goes to severfarm 1.

client coming with URL2 goes to serverfarm2 and everything else goes to class default which has serverfarm on which you can apply sticky.

Test it and let me know how it goes.



Cisco Employee

Sticky behavior

I was thinking about it and i think you need to get rid of src based sticky unless it is a requirement. You can use content based sticky for class default serverfarm. Because src based sticky will not look at any other thing once it matches the sticky table entry.

Community Member

Sticky behavior

Hi Kanwal,

Thanks for the Reply, But we would need IP Sticky for session persistence , Just wondering how this setup works like with IP sticky and having URL based load balancing. Which one takes priority?

And What would be the alternate option here , We cant use HTTP cookie due to some App restrictions.

Cisco Employee

Sticky behavior

Hi Syakshanulla,

You can use L7 sticky parameters for session persistence like header, http content etc. This is basically to look for a string or a value in HTTP header for session stickiness. I would recommend going through ACE user guide in section "configuring stickiness" for further details. You will get details about different ways you can get session persistence using information in L7.

If  src sticky is applied to a serverfarm and once LB has happened, the session will always stick to the same server as long as the entry is there in sticky table and ACE will not look further into HTTP header.

But by using L7 parameters for session persistence, your requirement can be met. Of course you will need to test it. A simple example is below. This is from user guide.

sticky http-header MSISDN HEADER-GROUP1

timeout 30

serverfarm SFARM1

sticky http-header TestHeader HEADER-GROUP2

header offset 15 length 7

timeout 30

serverfarm SFARM2

class-map match-all L4STICKY-HEADER_129:80_CLASS

2 match virtual-address tcp eq www

class-map type http loadbalance match-all L7MSISDN_CLASS

2 match http header MSISDN header-value ".*"

class-map type http loadbalance match-all L7TESTHEADER_CLASS

2 match http header TestHeader header-value ".*"

policy-map type loadbalance first-match L7PLBSF_STICKY-HEADER_POLICY


sticky-serverfarm HEADER-GROUP1


sticky-serverfarm HEADER-GROUP2

class class-default

serverfarm DEFAULT

The above example is using parameter HTTP header. You can use HTTP Content as well.



CreatePlease to create content