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

ACE: Different Sticky rules for different URLs

Is there a way to apply different sticky rules (or no sticky at all) depending on the URL for a given site under ACE?

The reason I want to do this is because I have an extremely common URL that chews up sticky resources when it doesn't matter if the URL is sticky. We have several thousand PC's that have a web based screen saver on them that just pull random pages to be displayed on the users' screen when the screen saver kicks in. These pages do not need to be sticky but other pages on the same farm need sticky. Is this possible?

Casey

1 ACCEPTED SOLUTION

Accepted Solutions

Re: ACE: Different Sticky rules for different URLs

Create a more specific Layer 7 class map and instead of calling sticky serverfarm use serverfarm.

for example

sticky http-cookie COOKIE STATIC

cookie insert browser-expire

timeout 5

serverfarm WEBFARM

serverfarm host WEBFARM

rserver SV1 80

inservice

rserver SV2 80

inservice

class-map match-any APP1-VIP

2 match virtual-address 10.86.178.160 tcp eq http

class-map type http loadbalance match-all Condition1

2 match http url .*

3 match http header Host header-value 172.16.31.*

4 match http header User-Agent header-value .*MSIE.*

class-map type http loadbalance match-all Condition2

2 match http url .*

policy-map type loadbalance first-match L7_COOKIE_STATIC

class Condition2

sticky-serverfarm STATIC

class Condition1

serverfarm WEBFARM

policy-map multi-match CLIENT_VIPS

class APP1-VIP

loadbalance vip inservice

loadbalance policy L7_COOKIE_STATIC

loadbalance vip icmp-reply active

loadbalance vip advertise active

Syed

5 REPLIES

Re: ACE: Different Sticky rules for different URLs

Create a more specific Layer 7 class map and instead of calling sticky serverfarm use serverfarm.

for example

sticky http-cookie COOKIE STATIC

cookie insert browser-expire

timeout 5

serverfarm WEBFARM

serverfarm host WEBFARM

rserver SV1 80

inservice

rserver SV2 80

inservice

class-map match-any APP1-VIP

2 match virtual-address 10.86.178.160 tcp eq http

class-map type http loadbalance match-all Condition1

2 match http url .*

3 match http header Host header-value 172.16.31.*

4 match http header User-Agent header-value .*MSIE.*

class-map type http loadbalance match-all Condition2

2 match http url .*

policy-map type loadbalance first-match L7_COOKIE_STATIC

class Condition2

sticky-serverfarm STATIC

class Condition1

serverfarm WEBFARM

policy-map multi-match CLIENT_VIPS

class APP1-VIP

loadbalance vip inservice

loadbalance policy L7_COOKIE_STATIC

loadbalance vip icmp-reply active

loadbalance vip advertise active

Syed

New Member

Re: ACE: Different Sticky rules for different URLs

Thanks Syed

So I match the IP first, then based on the URL I choose a different Farm. Is that how to interpret this? I was under the impression that class-map statements have to match first before a farm is chosen. Thanks.

Re: ACE: Different Sticky rules for different URLs

We are matching class-map statement here and selecting different farms for different conditions.

There are two class maps. First one to select the Virtual Ip and second to check the layer 7 details of the incoming traffic.

Syed

New Member

Re: ACE: Different Sticky rules for different URLs

That makes perfect sense. Thank you again very much. This saves me from having to create a whole new VIP/Farm.

Casey

Re: ACE: Different Sticky rules for different URLs

Little correction.

class-maps are compared in sequential order. Adjust the class order appropriately under L7 policy map.

sticky http-cookie COOKIE STATIC

cookie insert browser-expire

timeout 5

serverfarm WEBFARM

serverfarm host WEBFARM

rserver SV1 80

inservice

rserver SV2 80

inservice

class-map match-any APP1-VIP

2 match virtual-address 10.86.178.160 tcp eq http

class-map type http loadbalance match-all Condition1

3 match http header Host header-value 172.16.31.*

4 match http header User-Agent header-value .*MSIE.*

class-map type http loadbalance match-all Condition2

2 match http url .*

policy-map type loadbalance first-match L7_COOKIE_STATIC

class Condition1

sticky-serverfarm STATIC

class Condition2

serverfarm WEBFARM

policy-map multi-match CLIENT_VIPS

class APP1-VIP

loadbalance vip inservice

loadbalance policy L7_COOKIE_STATIC

loadbalance vip icmp-reply active

loadbalance vip advertise active

Syed

155
Views
5
Helpful
5
Replies
CreatePlease login to create content