ACE: Loadbalancing active/standby model with sticky connections

Unanswered Question
Apr 11th, 2010

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?

eg.

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.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
ciscocsoc Mon, 04/12/2010 - 00:27

Hi,


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
    inservice


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


sticky ip-netmask 255.255.255.255 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 10.1.1.1 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
    inservice
  rserver mybackup
    inservice standby



HTH


Cathy

bernardgan Mon, 05/17/2010 - 16:54

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

Actions

This Discussion