Persistence issue with aflex

leburtonleburton Member

Hi, I have a very simple script handling redirection to an outage server if my primary servers aren't available (see below). I have however got an issue that when persistence is applied (source-ip or cookie persistence), users are being persisted to the outage pool even after the primary service group is back online. Is there a simple way to expand the script to stop this unwanted persistence case?

e.g. using persist uie delete ? or should I use match-type service group with a cookie persist template?


when RULE_INIT {

 set ::DEBUG 0

}

when LB_FAILED {

pool service-outage_v4-80

if { $::DEBUG == 1 } { log "ipv4 service outage!" }

}


Thanks!

Answers

  • siddharthaasiddharthaa Member, Administrator admin

    Hi,


    You could try configuring "Alternate Real Servers" for backup - with this, you can assign one or more backup servers as alternates for a given primary server. If that specific primary server goes down, one of its alternate servers takes over. 

    When a down server comes back up, the server is placed back into service. New sessions can be sent to the server. The alternate server is gracefully removed from service. Existing sessions on the alternate server are allowed to continue until they are terminated or they time out.


    Here is a sample config snippet from the ACOS SLB guide:

    The following commands configure 2 primary servers, and assign alternate servers to each of them:

    ACOS(config)# slb server rs1 10.10.10.10
    ACOS(config-real server)# alternate 1 rs1-a1
    ACOS(config-real server)# alternate 2 rs1-a2 
    ACOS(config-real server)# alternate 3 rs1-a3 
    ACOS(config-real server)# port 80 tcp 
    ACOS(config-real server-node port)# exit
    ACOS(config-real server)# exit 
    ACOS(config)# slb server rs2 10.10.10.20 
    ACOS(config-real server)# alternate 1 rs2-a1 
    ACOS(config-real server)# alternate 2 rs2-a2 
    ACOS(config-real server)# alternate 3 rs2-a3 
    ACOS(config-real server)# port 80 tcp 
    ACOS(config-real server-node port)# exit 
    ACOS(config-real server)# exit 
    


    See the SLB guide for a complete example.

Sign In or Register to comment.