Forum Discussion
Raj_Zucre_Ramir
Nimbostratus
Feb 09, 2011Redirect uri /raj to same pool but with different port
Hi,
Please help:
www.testrule.com = pool_abc:1245
www.testrule.com/raj = pool_abc:9876
Then I created this irule and applied to www.testrule.com VS:
when HTTP_REQUEST {
if { [HTTP::uri] contains "/raj" } {
pool pool_abc:9876
} else {
pool pool_abc:1245
}
}
but it's not working.
Is this correct? Am I missng anything with rgards to server port? Could you please help me?
Thanks!
Raj
5 Replies
- hoolio
Cirrostratus
. - hoolio
Cirrostratus
Hi Raj,
If you define the collection of IP:ports for the /raj URIs in one pool and the other IP:ports in a second pool, you can use an like this to select between the two pools:when HTTP_REQUEST { switch -glob [HTTP::uri] { "/raj*" { pool poo_raj_abc } default { pool pool_abc } } }
Aaron - Colin_Walker_12Historic F5 AccountYou could also use the node command to send to a specific node and port combination if you can't configure the pools properly, but Aaron's solution above is the most simple and scalable.
Colin - dragon_94796
Nimbostratus
Hi AaronIf you create 2 pools as above , so u need to create 2 vs , right?
vs1 ------ port 1245
vs2-------port 9876
- Chris_Miller
Altostratus
Posted By dragon on 02/12/2011 07:24 PM
Hi AaronIf you create 2 pools as above , so u need to create 2 vs , right?
vs1 ------ port 1245
vs2-------port 9876
Nope, LTM will perform port translation for you. Your VS can be port 80, pool 1 members can listen at 1245, pool 2 members can listen at 9876, and LTM will translate the destination port from 80 to whichever port for which the members are configured.
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