Forum Discussion

dlogsdonmd's avatar
dlogsdonmd
Icon for Nimbostratus rankNimbostratus
Feb 25, 2016

Default Pool and iRules

Hello,

I have a default pool of servers assigned to a VS object and then also have an irule that specifies specific traffic (URIs) should be directed to different server pools.

How does the LTM treat all the traffic to the LB object? Does all traffic go to the configured "default pool" or is it inspected and then directed to the "default pool" only if it doesn't meet the criteria in the iRule? Our iRule is below and the last pool referenced is the same pool configured in the "default pool" on this object.

Thanks in advance.

Diane

when HTTP_REQUEST {


 if { [string tolower [HTTP::uri]] contains "/pamspersonifywebservice" } { 
   if {[active_members PAMS_PersonifyWebservices] > 0} { 
      pool PAMS_PersonifyWebservices
   } else { 
      HTTP::redirect "http://maintenance.acc.org" 
      event disable all 
   } 
 }
 elseif { [string tolower [HTTP::uri]] contains "/pamsrestservices" } { 
   if {[active_members PAMS_RESTWebservices] > 0} { 
      pool PAMS_RESTWebservices
   } else { 
      HTTP::redirect "http://maintenance.acc.org" 
      event disable all 
   } 
 }
 elseif { [string tolower [HTTP::host]] contains "webservices.acc.org" } { 
   if {[active_members Webservices_RDWS] > 0} { 
      pool Webservices_RDWS
   } else { 
      HTTP::redirect "http://maintenance.acc.org" 
      event disable all 
   } 
 }
 else {
      HTTP::respond 404 content "Unrecognized request to [HTTP::uri]" "Content-Type" "text/html" 
    }
}

1 Reply