Forum Discussion
Irules and policy,direct pool member based On Http uri
Margvin I am not seeing any content if you could please correct the issue then at that point we should be able to assist you further.
LTM basic configuration will link a certain number of Node <IP:port> sockets to your LTM Pool, and then link the LTM pool to the Virtual Server.
Without iRules and/or policies, F5 will forward every client request to the node that was selected using the specified LB method.
iRules and policies can modify this behavior. The first thing you should dunderstand is that it's event-driven, so your first statement in irule code should specify when you want to change the behavior.
In your example, when the first HTTP packet is seen on F5 whe HTTP_REQUEST even will fire. (There's several more that will fire before that). With an HTTP profile, you can script something that retrieves informations on this request and possibly rewrite it, or use it to change LB behavior:
when HTTP_REQUEST { set uri [HTTP::uri] if {$uri starts_with "/event"}{ # do something } }
Different events can fire when LB selects your node, so you can change the behavior on that event as well.
When F5 receives the http response, once again another event will fire and more decisions can be made ..All of iRule commands, events, etc. are documented online
https://clouddocs.f5.com/api/irules/Commands.html
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