Dynamic FQDN Node DNS Resolution based on URI with Route Domains and Caching iRule
Old topic, but... If the goal is just to have the F5 route to an FQDN node based on a route specified in another Route Domain, then one option is to attach this simple iRule to any VIPs using FQDN nodes defining the Route Domain Gateway the pool members should use:
when CLIENT_ACCEPTED {
nexthop 10.10.10.1%1
}Many other options here are using some variation of "set node" in HTTP_REQUEST to modify the node selection to have the Route Domain appended to it. The main issue I've observed with these methods is that using "set node" prevents any load balancing and persistence used by the VIP/pool from happening, since the load balancing decision and persistence takes place in LB_SELECTED, which is after HTTP_REQUEST. They also don't take healthchecks into account, and would send traffic to a downed node.
This iRule still uses whatever load balancing method is assigned to the pool, and whatever persistence is assigned to the VIP, and it doesn't interfere with any other HTTP_REQUEST iRules attached to the VIP since it uses CLIENT_ACCEPTED.
The only remaining downside of this iRule is that the healthcheck traffic will still use the default Route Domain routing table. Unfortunately this issue can't be bypassed by using an inband monitor, because inband monitors aren't supported on FQDN nodes.