Irule F5 LMT

Hi Everyone

I need build an Irule on F5 LTM, this appliance has a Virtual Service with load balance to proxy server. I need when the user data arrive on VS LTM, I can see the data and select on wich Pool distribuit this traffic. e.g. When a User go to google.com the F5 intercepts this traffic anddeliver to pool member 1. The other traffic go to pool memeber 2.

The F5 in this moment has a VS Performan L4, and I do capture the traffic, on the data contains I can see the requuest.

so create one :slight_smile: there is lots of information on dev central to make this happen. learning to do it yourself will be much more useful then getting the irule here as an answer.

info on pool selection: DevCentral - An F5 Technical Community

more of an example: DevCentral - An F5 Technical Community

though that works on a URI, but still the idea should be clear, for example on doing it on host see this:

more here: DevCentral - An F5 Technical Community

when HTTP_REQUEST { if { ([string tolower [HTTP::payload]] contains “google.com”) } { set pool pool1 { else { set pool pool2 } }

James

Thanks For your Help

This Irule can take the traffic without Virtual Server in L7, Because currently is in L4.

Thanks

TCP::collect would help DevCentral - An F5 Technical Community

Just you need to find out how much length of TCP you need to collect to find google.com. I would not collect all TCP data.

when CLIENT_ACCEPTED {
  TCP::collect 15
}
when CLIENT_DATA {
  if { [TCP::payload] contains "XYZ" } {
     pool xyz_servers
  } else {
     pool web_servers
 }
 TCP::release
}

Hi Everyone

Today I did deployment this Irule. Until now, all traffic is redirect nice. I will wait attend to verify this behaviour