Forum Discussion
Daniel_Vu_10371
Nimbostratus
Mar 16, 2007How do I test to see which node from the pool
We have setup a testpool with 2 nodes
node-1 ip address is 172.16.1.12
node-2 ip address is 172.16.1.14
node-3 ip address is 172.16.1.16
We also setup a virtual server (ip = 172.16.1.5) so
our user can access through the browser that will
redirect to s specific url from one of the nodes created above. My question is how do I test the node
from the testpool so we can redirect to the specific url.
Can someone please explain to me what happened when the users hit http://172.16.1.5/ url
and how do I test which value from the testpool?
Thanks,
5 Replies
- Colin_Walker_12Historic F5 AccountI'm not sure I understand what you're asking. Are you saying you want to direct traffic to a specific node in your pool based on what the url is given by the client?
Colin - Ken_Wong_48678Historic F5 AccountYes, I also want to know how direct traffic to a specific node in a pool based on what the url is. What command should I use for the node selection. Thanks!
Ken - JRahm
Admin
when HTTP_REQUEST { if { [string tolower [HTTP::uri]] starts_with "/node-1" } { use pool member 172.16.1.12 } elseif { [string tolower [HTTP::uri]] starts_with "/node-2" } { use pool member 172.16.1.14 } elseif { [string tolower [HTTP::uri]] starts_with "/node-3" } { use pool member 172.16.1.16 } }
So if your request began http://172.16.1.5/node-1/, you would select 172.16.1.12... - JRahm
Admin
you'll probably want to strip that /node-$x out before passing onto the server, unless that is a valid path... - Unfortunately there isn't a way to specify members outside of specifying their address and ports.
You could store the values in a Data Group to basically name your own members and look them up with findstr (search the forums or the documentation for findstr to get some examples. The downside to this approach is that you'll have to make sure the data groups are in sync with your configuration.
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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