Forum Discussion

John_LeMay_1062's avatar
John_LeMay_1062
Icon for Nimbostratus rankNimbostratus
Jun 16, 2008

Simple method to add persistence?

I currently have a virtual configured with an irule similar to the below code. I'm looking for a way to add persistence when necessary for each of the pools I'm directing to.

 

 

I've read through the wiki page and several posts here, but I'm still not quite getting the concept.

 

 

Do I need to do anything more than add a simple persist statement within the appropriate block, or do I then need to look for that persistence when each request is made by a client?

 

 

I'm looking for simple cookie or source_ip persistence, perhaps both depending on the scenario.

 

 

 
  
 when HTTP_REQUEST { 
    
  Parse header as lower case 
   switch [string tolower [HTTP::host]] { 
     one.domain.com { 
       pool pool_one.domain.com 
     } 
     two.domain.com { 
       if { [HTTP::path] eq "/" }{ 
         HTTP::uri "/reports" 
       } 
       pool pool_two.domain.com 
     } 
     default { 
       reject 
     } 
   } 
 } 
  
 

1 Reply

  • You can specify the parent persistence profile in the appropriate block (using 'persist cookie insert' or 'persist cookie insert COOKIE_NAME 0'). LTM will auto-magically handle the use/addition of the persistence record or cookie.

     

     

    Aaron