Forum Discussion

Brian_Kenworthy's avatar
Brian_Kenworthy
Icon for Nimbostratus rankNimbostratus
Nov 04, 2009

Persistence Across pools via iRule

Hi all,

 

 

We are experiencing an issue which I need some expert feedback to see if we are doing this properly with out iRule....

 

 

We have a virtual server with an iRule applied that is inspecting the URI to redirect traffic to one of three different pools, here is the rule:

 

 

when HTTP_REQUEST {

 

switch -glob [string tolower [HTTP::uri]] {

 

"/vmsxml/order.asp*" -

 

"/vmsxml/status.asp*" -

 

"/_xml/ors/status_mismo21.asp*" -

 

"/_xml/ors/status.asp*" -

 

"/_xml/ors/rels_status_mismo21.asp*" {

 

pool uat.domain.com_B2B_HTTPS

 

}

 

"/batchprocessing*" {

 

pool uat.domain.com_BatchPro_HTTPS

 

}

 

default {

 

pool uat.domain.com_HTTPS

 

}

 

}

 

}

 

 

Users have to first log into the website behind the pool uat.domain.com_HTTPS which is using an HTTP cookie insert profile. From that website, they access a link which directs them over to the uat.domain.com_BatchPro_HTTPS pool with a very simple upload page in which the user uploads a file. While waiting for a stored procedure to return from the data import, the user is returned what appears to be a timeout after 10 minutes.

 

 

I am wondering if this is due to persistence not being set on the uat.domain.com_BatchPro_HTTPS pool? Is it possible that the browser is checking the cookie and redirecting back to the web server in the uat.domain.com_HTTPS pool? I came across some posts about universal persistence so I am wondering that that is what we should be looking at?

 

 

Thanks in advance for any help.

 

 

-Brian

2 Replies

  • The only time from what I have observed is if the you are moving from one virtual server. Cookie Persistence is created when hit the virtual server and will change if you move between virtual servers. However, your irule doesn't look like it's doing that.

     

     

    The quick test is to go to the server directly and see if you see the same timeout.

     

     

    CB

     

  • The persistence cookie contains an encoding of the member IP:port. If the VIP is using cookie insert persistence but requests are load balanced across pools, the persistence will fail whenever the last selected pool member IP:port doesn't exist in the currently selected pool.

    You could try inserting a unique cookie per pool in an iRule using the persist command (Click here😞

     
     when HTTP_REQUEST { 
        switch -glob [string tolower [HTTP::path]] { 
           "/vmsxml/order.asp" - 
           "/vmsxml/status.asp" - 
           "/_xml/ors/status_mismo21.asp" - 
           "/_xml/ors/status.asp" - 
           "/_xml/ors/rels_status_mismo21.asp" { 
              persist cookie insert b2_cookie 
      pool uat.domain.com_B2B_HTTPS 
           } 
           "/batchprocessing*" { 
              persist cookie insert batch_cookie 
              pool uat.domain.com_BatchPro_HTTPS 
           } 
           default { 
              persist cookie insert https_cookie 
              pool uat.domain.com_HTTPS 
           } 
        } 
     } 
     

    Also, if you check the path using HTTP::path instead of the URI, you can remove the wildcard from the end of the asp paths.

    Aaron