Forum Discussion
Singh_74932
Nimbostratus
Oct 08, 2008conditional select
Ok here is what i want to do and i tried witting some thing my self this time :
Logically :
if host name = xyz.com
then select pool member a from
else if host name = abc.com
select pool member b from same pool
Syntax :
when HTTP_REQUEST {
if { [HTTP::host] equals "xyz.com" } {
LB::reselect pool myPool member1
} else if {[HTTP::host] equals "xyz.com" }
LB::reselect pool myPool member2
}
Let me know
- hoolio
Cirrostratus
You can just use the pool command with the member. You don't need to use LB::reselect in this case. The pool wiki page has some examples (Click here).when HTTP_REQUEST { if {[string tolower [HTTP::host]] equals "xyz.com" } { pool myPool member 10.1.2.100 80 } elseif {[string tolower [HTTP::host]] equals "abc.com" } pool myPool member 10.1.2.200 80 } else { take some default action? } }
- Or, you might want to consolidate those two "string tolower"'s into one with a switch to avoid unnecessary memory allocations.
when HTTP_REQUEST { switch [string tolower [HTTP::host]] { "xyz.com" { pool myPool member 10.1.2.100 80 } "abc.com" { pool myPool member 10.1.2.200 80 } default { take some other action. } } }
- Singh_74932
Nimbostratus
Guys .. qq sa this virtual server is already having one irule i just got confused over what sequence traffic will hit iruule.. i mean this is what UI shows me : - hoolio
Cirrostratus
Hi Rajwinder, - Singh_74932
Nimbostratus
cool .. - hoolio
Cirrostratus
If you're not decrypting the SSL, you won't be able to inspect the HTTP headers or data. If you need to pass the request via SSL to the pool, you could decrypt the traffic using a client SSL profile, parse the data as HTTP with an HTTP profile and then re-encrypt it on the server side using a server SSL profile. - Singh_74932
Nimbostratus
ah .. so that means if i have to put any rule on VS handling https i have to put certificates + private key on big ip itself to decrypt and then encrypt it again ? I - hoolio
Cirrostratus
You don't have to re-encrypt the server side connection unless your security requirements dictate that, or the server(s) only accept HTTPS traffic. - Singh_74932
Nimbostratus
Need some views here : - hoolio
Cirrostratus
This is probably due to clients making multiple requests over the same TCP connection. If so, you can enable OneConnect to fix the issue:
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