Forum Discussion

acowell_1349's avatar
acowell_1349
Icon for Nimbostratus rankNimbostratus
Sep 19, 2008

How does persistence work in this case?

I have two pools, one with static content with no persistence requirement, and one with dynamic content which requires persistence.

The iRule I have in mind is something like this:

when HTTP_REQUEST { 
   if { [HTTP::uri] starts_with "/app/" } { 
     pool pool_dynamic 
     persist source_addr 255.255.240.0 360 
   } else { 
     pool pool_static 
   } 
 }

Once a client goes through the /app/ if statement and gets persistence applied on the dynamic pool, does that persistence now apply for the static pool as well?

1 Reply

  • If you don't have a persistence profile specified on the VIP, I don't think any persistence would be used unless specified in the rule. So no persistence should be used if the request doesn't match the /app/ clause.

     

     

    You could test this by using your rule and making one request to /app/ and then a second request on the same TCP connection to a non-"/app/" URI. You can get a dump of the persistence table by running 'b persist all show all'.

     

     

    If the persist command does take effect for the subsequent request on the same TCP connection, you could explicitly disable it by specifying 'persist none' in the else clause.

     

     

    Aaron