Forum Discussion
Gavin_Coulthar1
Jul 20, 2010Historic F5 Account
selective URI rewrite based on pool member
Hi,
i have a customer who would like to selectively rewrite the URI path based on which pool member has been selected. i.e. http://vip/App and rewrite to http://server1/App1 or http://server1/App2
the...
Chris_Miller
Altostratus
Jul 20, 2010Posted By hoolio on 07/20/2010 01:13 AM
Hi Gavin,
So there are two instances of an application running on the same web service? What advantage does the customer gain by load balancing between two different URIs on the same service? I'd have assumed it would use the same resources on the web server and not provide any performance improvement. Or do the different app instances talk with different backend databases or other infrastructure?
You couldn't use standard pool load balancing if the two application instances share an IP address and port as these are the two properties which define a pool member. Could you assign two different IP addresses to the web server? If so, you could then use default LTM load balancing and more easily rewrite the URI based on the selected IP:port. You could start with this Codeshare example which rewrites the host header based on the selected pool member. I'd try just rewriting the request URI and see if it works. You might not need to rewrite response headers or content.
http://devcentral.f5.com/wiki/default.aspx/iRules/rewrite_host_header_to_server_name
Which LTM version is the customer running? For 10.x, I'd suggest using the class command instead of findclass as it appears it the class command might be a lot more efficient than findclass.
http://devcentral.f5.com/wiki/default.aspx/iRules/class
Aaron
From what I'm reading, he must have multiple IPs on the box, otherwise I'm not sure how he has multiple pool members...definitely seems like a when LB_SELECTED, host header replace scenario.
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
