Forum Discussion
eliezer_ramos_2
Nimbostratus
Mar 09, 2010How to use uri datagroup to forward to pool
Hi.. first time. I need to know how if doing this correctly. I'm trying to send traffic to a pool based on URI's in a datagroup. This is what I have so far:
datagroup customerservice2 contains /wrap, among other uri that are hosted out of the same pool member. Based on that I wrote this irule. Irule editor says the syntax is correct, but I may not be using the correct arguments/. Plz HELP!
when HTTP_REQUEST {
if {[ matchclass [HTTP::uri] contains $::customer_care] } {
pool p_customercare}
elseif {[ matchclass [HTTP::uri] contains $::dsm] } {
pool t_was_dsm}
elseif {[ matchclass [HTTP::uri] contains $::vendorapps] } {
pool t_vendorapps}
elseif {[ matchclass [HTTP::uri] contains $::pts] } {
pool p_pts}
elseif {[ matchclass [HTTP::uri] contains $::customerservice2 ] } {
pool p_customerservice2}
}
11 Replies
Sort By
- hoolio
Cirrostratus
The syntax and logic look fine. Have you had a chance to test it? - eliezer_ramos_2
Nimbostratus
Yes.. I did, but I get a 404. Do I need to include the forward slash in the data group? e.g. /customerservice. I created the uri data group as string, is that correct? - hoolio
Cirrostratus
Which LTM version are you running? If you add logs to the iRule can you check which cases are matching?when HTTP_REQUEST { log local0. "[IP::client_addr]:[TCP::client_port]: [HTTP::method] request to [HTTP::uri]" if {[ matchclass [HTTP::uri] contains $::customer_care] } { log local0. "[IP::client_addr]:[TCP::client_port]: Matched customer_care" pool p_customercare} elseif {[ matchclass [HTTP::uri] contains $::dsm] } { log local0. "[IP::client_addr]:[TCP::client_port]: Matched dsm" pool t_was_dsm} elseif {[ matchclass [HTTP::uri] contains $::vendorapps] } { log local0. "[IP::client_addr]:[TCP::client_port]: Matched vendorapps" pool t_vendorapps} elseif {[ matchclass [HTTP::uri] contains $::pts] } { log local0. "[IP::client_addr]:[TCP::client_port]: Matched pts" pool p_pts} elseif {[ matchclass [HTTP::uri] contains $::customerservice2 ] } { log local0. "[IP::client_addr]:[TCP::client_port]: Matched customerservice2" pool p_customerservice2 } }
- eliezer_ramos_2
Nimbostratus
I'm running 9.3.1... I'll give that a try. - eliezer_ramos_2
Nimbostratus
Hi.. this is what I found in the local traffic log..what I'm I looking for? - hoolio
Cirrostratus
So that log shows the parsed URI was /wrap and the request was sent to the customerservice2 pool. /wrap/ was then requested and went to the same pool. - hoolio
Cirrostratus
The 404 probably means that the request is going to a pool member which doesn't serve content for that URI or the server doesn't recognize the request. - eliezer_ramos_2
Nimbostratus
Well... guess what? I contacted the websphere servers admin and he needed to add something to the servers to allow the ltm to talk to them... Thanks for all your help. - What did the admin have to add? Back to Hoolio's ?, was it ever serving a content at that uri?
- eliezer_ramos_2
Nimbostratus
this is what they did.. "(virtual host definitions on websphere side need to be updated to include inappqa6.fpl.com for the incoming requests to be identified and served by backend WebSphere JVMs to route it applications)"
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