Forum Discussion

Fernando_33356's avatar
Fernando_33356
Icon for Nimbostratus rankNimbostratus
Jul 23, 2010

persistence when connecting to specific websites

Hi,

 

my LTM balances traffic to two different routes to go to the Internet usig to different public IP addresses. When a client connect to his webmail application is been disconnected because the IP is changing, then persistence is needed.

 

We have a VS for any HTTP traffic without persistence, but I want to persist only when going to the webmail.

 

I created an irule:

 

 

when HTTP_REQUEST

 

{ if { [HTTP::host] equals $::sites_with_persistence }

 

{ persist source_addr 255.0.0.0 900 }

 

else { persist none } }

 

 

The "sites_with_persistence" element is a datagroup with all sites with the same issue. We do not want to create a VS for every website.

 

 

However the irule is not working and when going to the website we are stil having the same problem and the stats for persistence are not showing entries for the VS nort the destination IP.

 

 

Am I doing something wrong? Is there any way to persist based on the IP instead of the host or url ?

 

1 Reply

  • Try this:
    when HTTP_REQUEST 
    { if { [HTTP::host] equals $::sites_with_persistence }
     { persist add source_addr 255.0.0.0 900
       persist source_addr } 
    else { persist none } }
    
    Something like this anyways. You need to use persist add to add an entry to the persistence table and then use persist source_addr to look at the table and persist off of it.