Sekhar
Feb 24, 2015Nimbostratus
Moving traffic from VIP to VIP
Hi,
How can I move 10% of traffic from a VIP
Requirement:
moving 10% of traffic from to www.abc.com and www.xyz.com
Thanks,
Sekhar
You could also do something like create your pool with a ratio of 18:1:1 for your
::
. Make your dummy members with the names www.abc.com and www.xyz.com with ips like 1.1.1.1 and 1.1.1.2 and not assign a monitor to them. Then use an iRule like this. Obviously you'll have to tweak the pool ratios if you have more than one real member. Persistence could work with this and you could monitor pool member status, other than the dummies.
when HTTP_REQUEST {
set myLocation [HTTP::uri]
}
when LB_SELECTED {
if { [LB::server name] starts_with "www." } {
set myHost [string map {"//" ""} [LB::server]]
set redirect 1
persist none
}
else {
set redirect 0
}
}
when HTTP_RESPONSE {
if {$redirect} {
HTTP::respond 302 noserver Location "http://$myHost$myLocation"
}
}
With this you would need to put the partition name where the pool member lives, could be Common.