Forum Discussion

fuatd_30923's avatar
fuatd_30923
Icon for Nimbostratus rankNimbostratus
May 13, 2011

Persistency between specific members of a pool

Hi,

 

 

I have a cookie and session id persistence iRule. What i want to additionally do is persistency with spesific members in pool. Let me explain,

 

I have one pool including 4 members (1, 2, 3 and 4). These web servers are grouped in two cell, which are 1 and 3 are in Cell1 and 2 and $4 are in cell2.

 

When member 1 (which is in Cell1) failed in pool, if the persistent client (not new client) is sent to 2 or 4 (one of the members in Cell2) client session is lost.I am looking for a solution for this. I have to use 4 members when 4 of them is up, but if one fails, i have to sent sessions on that server to the one in the same cell.

 

 

if 1 down

 

then select 3 for existing sessions

 

if 3 down

 

then select 1 for existing sessions

 

if 2 down

 

then select 4 for existing sessions

 

if 4 down

 

then select 2 for existing sessions

 

 

 

We accept risk loosing client session when both cell members (1 and 3 or 2 and 4) are down.

 

 

Thank you.

 

3 Replies

  • Hi Fautd,

     

    Are you using group priority in the Pool with the 4 members?

     

     

    Bhattman
  • Can you post your existing iRule(s) as well for this virtual server?

     

     

    Thanks, Aaron
  • Hi,

    Below is the iRule Aaron.

    In fact group priority is not a solution to my problem, because if i use group priority, 4 servers will not be active at the same time.

    
    when HTTP_REQUEST {
    if { [HTTP::cookie "BSESSIONID"] ne ""} {
    persist uie [string tolower [HTTP::cookie "BSESSIONID"]]
    }
    else {
    set bsess [findstr [string tolower [HTTP::path]] "bsessionid=" 11 ""]
    if { $bsess != ""} {
    persist uie $bsess
    }
    }
    }
    when HTTP_RESPONSE {
    if {[HTTP::cookie "BSESSIONID"] ne ""} {
    persist add uie [string tolower  [HTTP::cookie "BSESSIONID"]]
    }
    }