Forum Discussion
Chris_14167
Nimbostratus
Jan 29, 2010Content level routing question
Hi - I am very new to writing iRules, and right now we are using an iRule to perform a phased migration from one legacy system to a new server. Both answer on port 80. We are inspecting URI, and also looking for a string in the content of the packet to decide which pool to send the traffic to.
The issue I am having is that these servers support multiple URIs, and one specific URI appears not to work. The only thing we've found is that the server is sending it's data as HTTP 1.1, and all of the other servers that use this VS are using HTTP 1.0.
Troubleshooting steps have been to remove the content inspection rules and only route on URI. When we do that, it sends it to the correct pool. When we reintroduce the [HTTP::payload] inspection, the iRule works, but doesn't route properly.
Here is the iRule that we are using (uri's changed to protect the innocent):
when HTTP_REQUEST {
set uri [HTTP::uri]
set string1 "10000"
set string2 "20000"
set string3 "25000"
if { ($uri contains "/b2bgate") and ([HTTP::payload] contains $string1)} then {
pool gateway-prod
} elseif {
($uri contains "/b2bgate") and ([HTTP::payload] contains $string2)} then {
pool gateway-prod
} elseif {
($uri contains "/b2bgate") and ([HTTP::payload] contains $string3)} then {
pool gateway-prod
} else {
pool gateway-old
}
}
It looks like the F5 can't inspect the payload of the packet. What am I missing?
Thanks,
Chris.
- The_Bhattman
Nimbostratus
- hoolio
Cirrostratus
Hi Chris,
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects