Forum Discussion
Chris_Day_10331
Nimbostratus
Oct 04, 2005iRule for Server Testing
Good morning,
Please see attached doc.
Essentially, what we are trying to achieve is to be able to validate that a single server behind a VS is responding correctly. Ideally, we co...
Colin_Walker_12
Oct 04, 2005Historic F5 Account
Oh, and about the node name out of the URI, Joe's rule example does that already.
This section here is the part that performs the lookup:
...
Pull out the node name as the first element of the uri
ie. /web001/foo/bar -> web001
set node_name [lindex [split [HTTP::uri] "/"] 1]
if { "" ne $node_name } {
Now look for the node address in the lookup list
log local0. "Searching for node: $node_name"
set node_addr [findclass $node_name $::node_mapping " "]
if { "" ne $node_addr } {
log local0. "Routing to node: $node_addr "
node $node_addr
...It does a lookup in this class to relate the "web001" or whatever the hostname is in the URI, to the actual IP of the node:
class node_mapping {
web001 10.10.10.1
web002 10.10.10.2
web003 10.10.10.3
}So, for a request with web001 in the URI, it will be forwarded to 10.10.10.1.
Hopefully that helps clarify a bit.
-Colin
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