Forum Discussion
Fletcher_Cocquy
Sep 27, 2011Nimbostratus
iRule to select test pool based on cookie/env variable?
Hi all,
we have a virtual server mapping to a pool with one apache web node.
client wants to test the new node via the virtual server.
Can we craft an iRule to direct her session t...
hooleylist
Sep 27, 2011Cirrostratus
You could add the new member at a lower priority and then use an iRule like this to allow manual selection of it with a query string parameter and cookie:
http://devcentral.f5.com/wiki/iRules.Select_pool_member_based_on_HTTP_query_string_parameter.ashx
When you're done testing, change the priority of the new pool member to the same as the other one to have it used in normal load balancing.
Or as Brian said, if you can filter by client IP, it would be simpler to do something like this:
when CLIENT_ACCEPTED {
if {[IP::addr [IP::client_addr] equals 1.1.1.1]}{
node 10.1.1.1 80
}
}
With this simple iRule you don't even need to add the new member to the pool. When you're done testing, just remove the iRule and add the new member to the pool.
Aaron
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