ace - stickines - cookie and source based for the same VIP

Unanswered Question
Mar 17th, 2010


we have configured ACE to have cookie based stickiness for a vip address

we have a requirement where  we should maintain a source based cookie for few source  ip addresses for the same VIP

can you suggest how to configure both for the same vip

if the source is say and hiting vip then it should source based stickiness for serverfarm xyz

if any other source htting vip then it should be cookie based stickiness for the same serverfarm xyz

can someone put the config pls


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Sean Merrow Thu, 03/18/2010 - 08:30


Yes, this can be done.

You would set up your VIP (ie. class-maps and policy-maps) so that all users connecting to the VIP will be sent to the sticky-group that uses cookie-sticky.  However, you would also have a Layer-7 class-map that matches the two source addresses listed and send them to a sticky-group that uses source-ip sticky.

Might look something like this:

serverfarm host XYZ
  rserver SV1
  rserver SV2

sticky http-cookie ACE-COOKIE COOKIE-STICKY
  cookie insert
  serverfarm XYZ
sticky ip-netmask address source SOURCE-IP-STICKY
  serverfarm XYZ

class-map match-any VIP-WWW
  2 match virtual-address tcp eq http

class-map type http loadbalance match-any MY-HOSTS
  2 match source-address
  3 match source-address

policy-map type loadbalance first-match L7_SLB
  class MY-HOSTS
    sticky-serverfarm SOURCE-IP-STICKY
  class class-default
    sticky-serverfarm COOKIE-STICKY

policy-map multi-match HTTP
  class VIP-WWW
    loadbalance vip inservice
    loadbalance policy L7_SLB
    loadbalance vip icmp-reply active

Hope this helps,



This Discussion