Forum Discussion
Irule-Replace URL with random node specific and Port
Hi Ferhat,
as Stanislas already explained your LTM would already take care of the load balancing decission, based on available pool members and the configured load balancing lalgorythm. So no need to use iRules for that...
To change the HOST headers value to reflect the selected node IP and also port number you may use this rather simple iRule...
when HTTP_REQUEST_SEND {
HTTP::host "[IP::server_addr]:[TCP::server_port]"
}
... or if using multiple route domains...
when HTTP_REQUEST_SEND {
HTTP::host "[getfield [IP::server_addr] "%" 1]:[TCP::server_port]"
}
The outlined iRule will be triggered on each HTTP request right before sending the request to the real server and simply changes to HOST header value to the IP and Port of the selected server.
Cheers, Kai
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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