Forum Discussion

Austin_Geraci's avatar
Nov 17, 2010

matchclass, uri routing, and cookie persist & snat irule

Hey guys and gals, it's been a bit, I hope all is well.

Please review the below scenerio and let me know if i'm missing something, or if you would do anything differently..

I worked up the below iRule, I'd like to route traffic to one specific pool based on a class of uris, if no match, I'd like to route to another pool and use cookie persist... Simple enough.

The Virtual Server is terminating SSL and re-encrypting it.. using an client and server SSL profile..

In addition the VS is already using a snat iRule.. My thought is to juse use it first..Should I combine the snat iRule, or just keep it and use the below one after the snat iRule?

I should note, the box is running 10x on the 8900 platform.

Thanks!

iRule



when HTTP_REQUEST {
 set uri [string tolower [HTTP::uri]] 
log local0.notice "Incoming Request uri: $uri" 
if { [matchclass [HTTP::uri] starts_with $::myclass] } { 
   log local0.notice "Directing to secure_pool"    
   pool match_pool
 } else {
 log local0.notice "Directing to server_pool" 
  pool server_pool
 persist cookie
}
class

class myclass {

/myfirsturi

/myseconduri

/etcetcetc

}

[/

18 Replies