Forum Discussion
John_Klemm_4418
Nimbostratus
Oct 17, 2006http headers
Okay....I am new at this. I have two servers that are acting hand in hand, Meaning that if you try to access a website either server can pickup the request. The problem I am having is that I have to...
hoolio
Cirrostratus
Oct 19, 2006If the web servers each have the same content for all applications, you wouldn't need a rule. The web server is performing the HTTP Host header inspection when a request comes in to determine which application or "virtual server" on the web server to pass the request to.
If at some point you want to add more web servers which don't all serve content for every application the VIP is configured to load balance for, you would need to use a rule. You would want to configure one pool for each application and configure each web server that answers for one particular application. For example, you would have a pool each for app1, app2 and app3. If one web server answers for app1 and app2, you would add it as a node to both the app1 pool and app2 pool. If there was another web server that answered for app2 and app3, you would add it to the app2 pool and the app3 pool. Then you could use a rule on the BIG-IP which inspects the HTTP host header and selects the corresponding pool.
I think the latter option is what you're trying to address. The rule for that would look like:
when HTTP_REQUEST {
if { HTTP::host == "app1.example.com" }{
pool app1_pool
}
elseif { HTTP::host == "app2.example.com" }{
pool app2_pool
}
elseif { HTTP::host == "app3.example.com" }{
pool app3_pool
}
else {
pool default_pool
}
}If you have a lot of different hosts to look for you would want to consider using a switch statement to evaluate the Host header value.
The pool configuration would look something like this:
pool app1_pool {
member 10.0.0.1:http
member 10.0.0.2:http
}
pool app2_pool {
member 10.0.0.1:http
member 10.0.0.3:http
}
pool app3_pool {
member 10.0.0.2:http
member 10.0.0.3:http
}
Does this cover what you were asking about?
Aaron
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
