Forum Discussion
Kai_Wilke
Feb 15, 2016MVP
Hi Raj,
you may take a look to the snippet below...
It compares the currently selected node with the output of
[members -list YOUR_NEW_APP_POOL]
(where the pool YOUR_NEW_APP_POOL contains just the new application servers). If the currently selected member can be found, then the [clientside]
command can be used to change the request as needed...
when RULE_INIT {
set static::new_app_pool "/Common/YOUR_NEW_APP_POOL"
}
when HTTP_REQUEST_SEND {
if { [members -list $static::new_app_pool] contains "[LB::server addr] [LB::server port]" } then {
log -noname local0.debug "Match! [members -list $static::new_app_pool] contains [LB::server addr] [LB::server port]"
clientside {
Rewrite the request as needed...
}
} else {
log -noname local0.debug "Don't match! [members -list $static::new_app_pool] contains [LB::server addr] [LB::server port]"
}
}
Note: The pool YOUR_NEW_APP_POOL is just used to identify the new application servers. Its not used for LB or forwarding the traffic.
Cheers, Kai