cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1239
Views
0
Helpful
5
Replies

Stickness CSM and ACE

enandres
Level 1
Level 1

Hi,

I am moving from CSM to ACE and I have a doubt regarding stickness. I have next config in CSM:

sticky 5 cookie MY_COOKIE timeout 10
!
vserver VIP-1
  virtual 1.1.1.1 tcp 80
  serverfarm SFARM-1
  sticky 10 group 5
  persistent rebalance
  inservice
!
vserver VIP-2
  virtual 2.2.2.2 tcp 80
  serverfarm SFARM-2
  sticky 10 group 5
  persistent rebalance
  inservice
!
vserver VIP-3
  virtual 3.3.3.3 tcp 80
  serverfarm SFARM-3
  sticky 10 group 5
  persistent rebalance
  inservice
!

Config in ACE:

sticky http-cookie MY_COOKIE 5
  timeout 10
  serverfarm ???????????
!
policy-map type loadbalance first-match VIP-1
  class class-default
    sticky-serverfarm 5

!

policy-map type loadbalance first-match VIP-2
   class class-default
     sticky-serverfarm 5

!

policy-map type loadbalance first-match VIP-3
   class class-default
     sticky-serverfarm 5

What would be the config in ACE? I do not know how to do  this configuration in ACE module because I think I can only associate  one serverfarm

Thanks!

1 Accepted Solution

Accepted Solutions

The config looks ok.

Best regards

Jim

View solution in original post

5 Replies 5

jsirstin
Level 1
Level 1

The CSM config  does not look correct. You should only use one serverfarm per sticky group. This is with both the CSM and ACE. If not you may see some strange behavior depending on how the serverfarms are configured. Can you send the show run output for the serverfarms so I can see how you have them configured on the CSM?

This is how you would use the same sticky group for different vips on the ACE.

serverfarm host SF-1
  probe WEB_SERVERS
  rserver S1

    inservice
  rserver S2

    inservice
  rserver S3

    inservice
  rserver S4

    inservice

sticky http-cookie MY_COOKIE 5

  timeout 10

     serverfarm SF-1

policy-map type loadbalance first-match VIP-1

  class class-default

    sticky-serverfarm 5

class-map match-all L4-CLASS-1

  2 match virtual-address 1.1.1.1 tcp eq www

class-map match-all L4-CLASS-2

  2 match virtual-address 2.2.2.2 tcp eq www

policy-map multi-match VIPs
  class L4-CLASS-1

    loadbalance vip inservice
    loadbalance policy VIP-1

    loadbalance vip icmp-reply

      class L4-CLASS-2

    loadbalance vip inservice

    loadbalance policy VIP-1

    loadbalance vip icmp-reply

Since the same loadbalance policy is being used for both VIPs the user will stay stuck to the same server when hitting either vip.

Regards

Jim

Thanks for your speedy response. So I cannot use the same cookie "MY_COOKIE" for different serverfarms but in CSM apparently it is allowed. Actually what I am trying to understand is these strange behaviour you mentioned.

This is the serverfarm configuration:

serverfarm SFARM-1
  nat server
  no nat client
  real 1.1.1.5
   inservice
  real 1.1.1.6
   inservice
serverfarm SFARM-2
  nat server
  no nat client
  real 2.2.2.5
   inservice
  real 2.2.2.6
   inservice
serverfarm SFARM-3
  nat server
  no nat client
  real 3.3.3.5
   inservice
  real 3.3.3.6
   inservice

Many thanks.

El mensaje fue editado por: enandres

This note is from the CSM documentation.

Caution When using the same sticky group under multiple policies or virtual servers, it is very important to make sure that all policies or servers are using the same server farm or a different server farm with the same servers in it.


http://www.cisco.com/en/US/docs/interfaces_modules/services_modules/csm/4.2.x/configuration/guide/addftrs.html#wp1051258

Although the CSM lets you configured different serverfarms tied to the same sticky group it is not advisable. I see you have different servers in each farm. Are these the same physical machines with different IPs or are they physically 6 different machines? If the same user hits the different vips the uers will be stuck to the first serverfarm/server that builds the sticky entry. If your users are only hitting one of these vips then you would not see a problem.

With the ACE it will not let you configure it this way. You would need to create 3 separate sticky groups and add one to each vip. Why are you trying to use the same sticky group under multiple vservers. You only need to use the same sticky group under multiple vips when the client needs to go to the same server when hitting multiple vips. An example of this would be E-commerce where the user needs to sticky to a server while building the shopping cart on port 80, and also needs to go back to this same server when hitting the ssl vip to securely check out. If this is not your requirement than you should create one sticky group per vip.

Regards

Jim

Hi Jim,

Thanks for your answer much appreciated. Yes, I read the note in the CSM docs and what I think I can do it is create various sticky groups with the same cookie and associate each sticky group to a serverfarm and then each class with its the loadbalance policy. Bellow I put a config example, do you think it will work? Thanks again!

sticky http-cookie MY_COOKIE 5
  timeout 10
     serverfarm SF-1
!
sticky http-cookie MY_COOKIE 10
  timeout 10
     serverfarm SF-2
!
sticky http-cookie MY_COOKIE 15
  timeout 10
     serverfarm SF-3
!
policy-map type loadbalance first-match VIP-1
  class class-default
    sticky-serverfarm 5
policy-map type loadbalance first-match VIP-2
  class class-default
    sticky-serverfarm 10
policy-map type loadbalance first-match VIP-3
  class class-default
    sticky-serverfarm 15
!
class-map match-all L4-CLASS-1
  2 match virtual-address 1.1.1.1 tcp eq www
class-map match-all L4-CLASS-2
  2 match virtual-address 2.2.2.2 tcp eq www
class-map match-all L4-CLASS-3
  2 match virtual-address 3.3.3.3 tcp eq www
!
policy-map multi-match VIPs
  class L4-CLASS-1
    loadbalance vip inservice
    loadbalance policy VIP-1
    loadbalance vip icmp-reply
  class L4-CLASS-2
    loadbalance vip inservice
    loadbalance policy VIP-2
    loadbalance vip icmp-reply
  class L4-CLASS-3
    loadbalance vip inservice
    loadbalance policy VIP-3
    loadbalance vip icmp-reply

The config looks ok.

Best regards

Jim

Review Cisco Networking for a $25 gift card