Forum Discussion
rdessert_76127
Nimbostratus
Jul 27, 2012Load balancing to a domain name vs a pool
My organization has a website that has some of its content local and some located at a cloud provider. I have an existing irule which forwards traffic to different pools based upon the URI's. I hav...
Brian_Van_Stone
Nimbostratus
Jul 30, 2012The only way the cloud server has any idea whether or not you used a host name to connect is by the value of the host header. You should be able to just replace the value of the host header before forwarding the request on to the pool representing the cloud server's IP. The change might not be reflected in the log entry because I think header information is parsed once and then [HTTP::host] will always return what was parsed before iRule execution, but that's a question for the gurus.
{
HTTP::header replace "Host" "www.cloudHostName.com"
log local0.alert "cloud_pool Host:[HTTP::host]-[HTTP::uri]"
pool cloud_pool
return
}
If a connection is on any port other than 80 you will want to modify this to include the port at the end of the new host header value, but if the connection is on port 80, this should suffice.
Let me know how it goes. I didn't do any testing but I think this should do the trick.
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