Forum Discussion
William_Them_99
Nimbostratus
Jun 15, 2005Events after HTTP_REQUEST
Are there any events that occur after HTTP_REQUEST but before the bigip actually routes the request?
For instance, in the HTTP_REQUEST event you can say "pool mypool", but is there some event I can write iRules around that happens just before the bigip routes the packets to the specified pool?
- JRahm
Admin
Here are the events you can write rules against, at least the ones that I'm aware of: - William_Them_99
Nimbostratus
Looks like I might be able to use when RULE_INIT { log local0. "in RULE_INIT" } when HTTP_CLASS_SELECTED { log local0. "in HTTP_CLASS_SELECTED" } when HTTP_REQUEST { log local0. "in HTTP_REQUEST" } when HTTP_REQUEST_DATA { log local0. "in HTTP_REQUEST_DATA" } when HTTP_REQUEST_SEND { log local0. "in HTTP_REQUEST_SEND" } when HTTP_RESPONSE { log local0. "in HTTP_RESPONSE" } when HTTP_RESPONSE_DATA { log local0. "in HTTP_RESPONSE_DATA" } when HTTP_RESPONSE_CONTINUE { log local0. "in HTTP_RESPONSE_CONTINUE" } when CLIENT_ACCEPTED { log local0. "in CLIENT_ACCEPTED" } when CLIENT_CLOSED { log local0. "in CLIENT_CLOSED" } when CLIENT_DATA { log local0. "in CLIENT_DATA" } when SERVER_CLOSED { log local0. "in SERVER_CLOSED" } when SERVER_DATA { log local0. "in SERVER_DATA" } when LB_SELECTED { log local0. "in LB_SELECTED" } when LB_FAILED { log local0. "in LB_FAILED" } when NAME_RESOLVED { log local0. "in NAME_RESOLVED" } when USER_REQUEST { log local0. "in USER_REQUEST" } when USER_RESPONSE { log local0. "in USER_RESPONSE" } when SERVER_CONNECTED { log local0. "in SERVER_CONNECTED" } when SERVER_LINE { log local0. "in SERVER_LINE" }
- William_Them_99
Nimbostratus
Joe~ - Sure is. The IP::server_addr and TCP::server_port should get you what you need.
when HTTP_REQUEST_SEND { log local0. "server addr: [IP::server_addr]" log local0. "server port: [TCP::server_port]" }
- drteeth_127330Historic F5 AccountHTTP_REQUEST_SEND is a server-side event. Try using LB_SELECTED instead. You can use the LB::server command to get information about the selected pool member. I'm not entirely sure that the rule syntax checker will allow HTTP commands from within LB_SELECTED, but it might.
LB::server pool LB::server addr LB::server port
- unRuleY_95363Historic F5 AccountI'm not quite sure I understand what your request is here. You implied above that you wanted it to act like a true reverse proxy. This would have more to do with modifying the response than the request, as the url's in the response should get mapped from the server's host name to the BigIP's host name. I can't think of how mapping the Host: request header into the target of the request would help you.
- Looks like I had it backward for the HTTP_REQUEST_SEND event. Thanks drteeth!
- drteeth_127330Historic F5 AccountThe error message about a FASTHTTP profile beging required is incorrect. Did you have an HTTP profile?
- William_Them_99
Nimbostratus
Our config for the virtual server is using an HTTP profile and TCP as the protocol
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