Forum Discussion

kwillg_53003's avatar
kwillg_53003
Icon for Nimbostratus rankNimbostratus
Nov 11, 2010

Priority based on URI

I'm trying to setup an iRule that will do the following.

 

1. Round Robin general traffic

 

2. Send URI for particular requests to one server throughout the session (based on request IP) or send traffic to one node unless that node is down.

 

 

-Here was my first attempt (trying to track the node selection). We would like the content to forward to the firstnode in the pool if its available. The LB method is Round Robin and Priority Group is disabled.

 

 

when LB_SELECTED {

 

set member [LB::server addr]

 

set uri [HTTP::uri]

 

log local0. "Selected pool member $member - $uri"

 

set mynodes [active_members -list [LB::server pool]]

 

set firstnode [lindex $mynodes 1]

 

log local0. "First node is $firstnode"

 

if {[HTTP::uri] starts_with "/foo" } {

 

log local0. "URI is foo"

 

node $firstnode

 

}

 

}

 

 

Any help would be appreciated.

1 Reply

  • is persist irule for specific url applicable?

     

     

    this is discussion i found.

     

     

    irule - persistence for url path

     

    http://devcentral.f5.com/Forums/tabid/1082223/asg/50/showtab/groupforums/aff/5/aft/61948/afv/topic/Default.aspx