Forum Discussion

jgranieri's avatar
jgranieri
Icon for Nimbostratus rankNimbostratus
Oct 02, 2014

UIE string based persistence help

Hello,

 

I have a rule that was working 95% of the time in regards to UIE string based persistence, but sometimes the string was routed to 2 pool members. I can see in the uie persistence table the few occasions where the string is the exact same string but is sent to different pool members. For the most part it works correctly but I need to have it working 100%. any pointers or tips on the best way forward is greatly appreciated!!

 

I have an application that creates two sockets, in each the string is parsed correctly and is required to go to the same pool member. The sockets are opened anywhere from 1 to 3 seconds apart. I read some articles that explain where to persist uie and when to add persist add uie and I recently modified the rule to use LB_Selected event, however now im getting some TCL errors about the LB_selected event cantt find the variable used in the CLIENTSSL_Data event.

 

Here is the current Irule:

 

Code
        when CLIENTSSL_HANDSHAKE {
log local0. "[IP::client_addr]:[TCP::client_port]: SSL handshake completed, collecting SSL payload"
SSL::collect
}

when CLIENTSSL_DATA {
   set payload [SSL::payload]

   if { $payload contains "SOR" } {
       log local0. "Aggregator first socket initiated using SOR message parsing"
        Now execute first string match for the first socket
       set entityID [findstr $payload "@" 1 ","]
       pool xyz
       log local0. "Here is the first TCP socket entity $entityID"
       persist uie $entityID 1800
       SSL::release
   } elseif { $payload contains "LI" } {
       log local0. "App second socket initiated using LI message parsing"
        Now execute second string match for the first socket   
       set entityID2 [findstr $payload "@" 1 "null"]
       log local0. "Here is the second TCP socket entity $entityID2"
       pool xyz
       persist uie $entityID2 1800
       log local0. "Entity Session routing for $entityID2 and setting persistence"
       SSL::release
   } else {
       log local0. "No match is found"
   }
}
when LB_SELECTED {
   add server info to session table when server selected
   only add if key exists & node not directly selected above  
  if {$entityID  != "" }{
    session add uie $entityID [LB::server addr]:[LB::server port]
    log local0. "$entityID has been sent to [LB::server addr]:[LB::server port]"
   } elseif {$entityID2  != "" }{   
    session add uie $entityID2 [LB::server addr]:[LB::server port] 
   log local0. "$entityID2 has been sent to [LB::server addr]:[LB::server port]"
}
}
No RepliesBe the first to reply