redirect to node name based on URI

Is there a way to redirect to a node name based on a URI (without creating a list of IP addresses and names for lookup within the iRule)

Something like:

redirects to a node named serverA

I can do this by creating a look-up list, but this then hardcodes the IP’s in the iRule, making it another maintenance consideration.

Thanks in advance.

Hi John,

I don’t think there is a way to resolve a node name to an IP address from an iRule.

You could potentially create aliases without hardcoding a name to an IP:port combination. Something like:

serverA - “lowest” IP address in the pool

serverB - second “lowest” IP address in the pool

…

You can get a list of the active members of a pool using [active members -list] (Click here). You need to be running 9.4.2 or higher to use this command.

Aaron

This is possible with the NAME::lookup/NAME::response commands. Check out this thread: DevCentral - An F5 Technical Community Click here