Forum Discussion

treydore_225159's avatar
treydore_225159
Icon for Nimbostratus rankNimbostratus
Oct 02, 2015

iRULE Persistance Timeout Values

Hello.

 

Trying to learn more about iRULE persistence. Right now we have a DHCP iRULE and a RADIUS iRULE. For both, there is a line for setting persistence (example in quotes):

 

"set persist_ttl 28800"

 

I'm wondering, if we want permanent persistence, would that value be:

 

"set persist_ttl 0"

 

OR...Do we just comment out that line like:

 

"set persist_ttl 28800"

 

AND...If 0 isn't the right answer and commenting out the line won't work, what is the maximum value (in secs) we can use to create a type of pseudo persistence?

 

Thanks for the assistance.

 

7 Replies

  • Just to clarify - "...create a type of pseudo persistence?", I mean to create a type of psuedo PERMANENT persistence.

     

  • One more thing... :-)

     

    Does the persistence timer reset after each new transaction or is it an absolute timer that begins its countdown after the first sticky entry is created?

     

    Thanks again.

     

  • What kind of virtual verses are these iRules applied to? What profiles are applied to them? Can you show more text from the iRules?

     

  • I'm guessing there's more to your iRule, as "set persist_ttl indefinite" just sets the value of the persist_ttl variable to the value "indefinite". Generally speaking you'd need to use either the persist or persist add command in an iRule to set or retrieve a persistence table entry.

     

    https://devcentral.f5.com/wiki/iRules.persist.ashx

     

    In the absence of a timeout value the default timeout is 180 seconds. Also recognize that this is an idle timeout, so the persistence entry would have to go untouched for that amount time. It's probably not advisable to create a "permanent" persistence entry, given that you'd essentially be permanently storing persistence information for clients that have long since left the application.

     

  • Thanks Kevin for the information. We used a canned iRule, but found the default timeouts for stickiness were expiring based on that variable (8 hours). In our case, clients never leave (for the most part) since it's an internal corporate environment (desktops, printers, phones, etc.) and the application reacts better if these clients constantly hit the same back-end server in the cluster each and every time.

     

    Just some follow up questions though. Sounds like based on your description, the timer will reset every time the client connects through the LB to the back-end application. Do I understand your statement correctly? If so, then we don't need indefinite. We just need to set it to a higher value (say 24 hours). I was under the impression it was an absolute timer though so it makes the initial sticky entry and doesn't reset when new client traffic passed through the F5.

     

    Do you know what the maximum integer value can be for this variable?

     

    Thanks again.

     

  • Do I understand your statement correctly? If so, then we don't need indefinite. We just need to set it to a higher value (say 24 hours).

     

    You have to "touch" the persistence table entry periodically, which either means some form of persist operation (i.e persist, persist lookup, persist add), which would likely do in each request and/or response. The timer is based on idle time, so the counter restarts after each access.

     

    Do you know what the maximum integer value can be for this variable?

     

    I don't believe there is a maximum value, though 86400 seconds (24 hours) would not be unreasonable.