Forum Discussion
Sylvain_85827
Cirrus
Jul 02, 2013Rewrite URL based on selected node for load-balancing
Dears iRules Gurus and community,
Once again I need your help ^^ I'm wondering how to rewrite an URL of HTTP requests (IPP in fact) depending on the node chosen for load-balancing the traffic. ...
Kevin_Stewart
Employee
Jul 03, 2013There's no real concept of a "node number". Pool members are defined by their IP and port. You could do something like this to "translate" the load balanced pool member into a name value based on a data group entry:
when HTTP_REQUEST_SEND {
set nodenum [class match -value [LB::server addr] equals lb_server_datagroup]
log local0. $nodenum
}
Where "lb_server_datagroup" is a data group of type string containing the pool member IPs and an associated name. Example:
10.70.0.1 := node1
10.70.0.2 := node2
10.70.0.3 := node3
Once you have this (arbitrary) name, you can change the URI, Host header, anything else.
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