Cisco Support Community
Community Member

ACE: Loadbalancing active/standby model with sticky connections

I'm quite new to the ACE appliance so my apologies if the questions don't quite make sense.

We've had a requirement to put together a solution on an ACE where server A must always receive the connections. The only time that server B receives connections is when server A is down. Kind of like an primary/secondary active/standby model. Server A and B are accessable on the same url/VIP.

I'm fairly sure that the connections need to be sticky to allow session persistence.

I'm wondering what the correct way to implement this is. Would I simply add each server to it's own serverfarm and then reference each serverfarm in a seperate sticky-serverfarm and rely on the "first-match" to ensure that server A was always the "primary" or is that not how "first-match" works?


policy-map type loadbalance first-match TISM-50005-logic

  class PROD-URL

    sticky-serverfarm STICKYGROUPA

    sticky-serverfarm STICKYGROUPB

Or alternatively should I be looking into setting up the two servers in the same server farm and using weighting on the rserver settings to get it to work how we would like?

If there are any caveats or suggestions I would really appreciate it.


Re: ACE: Loadbalancing active/standby model with sticky connecti


For a situation with two servers - one primary, one secondary you don't really need stickiness but you can add it if you like. If you want stickiness then you can create two server farms - primary and secondary with one server in each. Link the two in the definition of the sticky serverfarm.

serverfarm host FARM-WebCT
  description WebCT Serverfarm
  probe Probe-WebCT
  failaction purge
  rserver apptier-a

serverfarm host FARM-WebCT2
  description Backup WebCT Serverfarm
  probe Probe-WebCT
  failaction purge
  rserver apptier-b

sticky ip-netmask address source FARM-WebCT-Sticky
   replicate sticky
   serverfarm FARM-WebCT backup FARM-WebCT2

FARM-WebCT2 will become sticky autom,atically when FARM-WebCT fails. Note that because of the stickiness users bound to FARM-WEbCT2 will stcik with it for the remainder of their session even after FARM-WebCT comes back.  The "failaction purge" will disconnect sessions if the server fails.  I don't know of a way to migrate the sessions from FARM-WebCT to FARM-WebCT2 using the ACE. This would have to be done at the application level.

Don't forget to add stickiness to the context using a Resource Class.

Then just reference the stciky serverfarm in the policy.

class-map match-any L4VIPCLASS-Web
  3 match virtual-address tcp eq http

policy-map type loadbalance first-match LB-POLICY-Web
  class class-default
    sticky-serverfarm FARM-WebCT-Sticky

policy-map multi-match L4POLICY
  class L4VIPCLASS-Web
    loadbalance vip inservice
    loadbalance policy LB-POLICY-Web

If you didn't want to use stickiness then you could use a backup rserver in the serverfarm definition.

serverfarm host SF-App
  description Contensis CMS Backend Application servers
  probe PROBE-80
  rserver myprimary
    backup-rserver mybackup
  rserver mybackup
    inservice standby



Community Member

Re: ACE: Loadbalancing active/standby model with sticky connecti

Thank you so much. Fast and detailed reply. I have decided to go with the non sticky option.

CreatePlease to create content