Forum Discussion

Arek's avatar
Arek
Icon for Nimbostratus rankNimbostratus
Aug 19, 2020

Source address affinity persistence none

Source affinity profile has persistence set to 12hrs for all source IP addresses but there is requirement to have no persistence for two servers.

I have an iRule but I dont think that works well and Source IPs are matched to the same nodes.

 

when HTTP_RESPONSE {

  if {([IP::server_addr] equals "192.168.255.10" ) || ([IP::server_addr] equals "192.168.255.17" )} {

persist none

  }

}

 

4 Replies

  • Hello Arek.

    Try this.

    when LB_SELECTED {
        if { ([lindex [LB::server] 1] equals "192.168.255.10") || ([lindex [LB::server] 1] equals "192.168.255.17") } {
            persist none
        }
    }

    Regards,

    Dario.

    • Arek's avatar
      Arek
      Icon for Nimbostratus rankNimbostratus

      Hello Dario,

       

      Thank you for your reply.

       

      I used rule below just for one server and It worked

       

      when CLIENT_ACCEPTED {

        if { [IP::addr [IP::client_addr] equals 192.168.255.17] } {

         persistence none

        }

      }

       

      Thank you,

      Arek

      • Hello Arek.

         

        Great to know that it's working.

         

        Anyway, your iRule is to disable persistence just for one single client (192.168.255.17), not for disabling persistence for some pool members, but if it suits your requirements is good.

         

        Regards,

        Dario.