Forum Discussion
Rodney_Newton_7
Nimbostratus
Sep 21, 2006Pool selection using uri variables
I have a unit in test where test sites are added frequently so I am constantly adding pools to the bigip and using and iRule for pool selection similar to the following.
when HTTP_REQUEST { ...
hoolio
Cirrostratus
Sep 22, 2006Hi,
You can set a pool using a variable like so:
when HTTP_REQUEST {
set my_pool "http_pool"
pool $my_pool
}So it would just be a matter of extracting the portion of the URI that contains the pool name using string functions following the TCL string reference (Click here).
One thing to determine first is what delineates the string containing the pool name from the rest of the URI. Would the URI always and only be /xx-testD or /xx-testDD where D is a digit? Or would it be the start of the URI, like /xx-testDD/some/path/to/object.html?
Try posting again here if you have questions on using string to get the pool name from the URI.
Edit: here's a post from citizen_elah showing an example for extracting the node address from the URI and directing the request to that node. You should be able to adapt that for getting the pool from the URI.Click here
Aaron
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