Forum Discussion
automusPrime_13
Nimbostratus
Oct 22, 2013Can I write a irule that uses a parameter in the url to specify the specific destination?
Troubleshooting an issue or when verifying a restarted server we have no way of specifying the specific destination server. This issue involves a Sharpoint 2010 farm environment
Kevin_Stewart
Employee
Oct 22, 2013You could try something like this:
when CLIENT_ACCEPTED {
set default_pool [LB::server pool]
}
when HTTP_REQUEST {
if { [HTTP::uri] contains "?nodeselect=" } {
set nodeselect [split [URI::query [HTTP::uri] nodeselect] "-"]
pool $default_pool member [lindex $nodeselect 0] [lindex $nodeselect 1]
}
}
This expects the desired pool member in a query string:
curl http://www.example.com/?nodeselect=10.70.0.1-80
This is a very simple implementation that doesn't address persistence or security. You may want to consider running this iRule on a separate VIP that's only accessible to the internal network.
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