Forum Discussion

BaltoStar_12467's avatar
Dec 26, 2013

BIG-IP : iRule return statement

From the docs :

Causes immediate exit from the currently executing event in the currently executing iRule. iRule processing is not aborted, and subsequent events will be triggered and evaluated. 

Note that return does not:

- cause an exit from the iRule altogether;
- prevent the same event from firing in another iRule; or
- prevent the same event with a higher priority value from firing in the same iRule.

To prevent further processing of an event in the current rule or other rules for the current TCP connection, you can use 'event EVENT_NAME disable'.

Here are my questions :

  1. How can the same event exist more than once within a single iRule ?
  2. Is 'current TCP connection' refer to a session that is maintained across multiple request-response sequences from a given client-browser ? Or does each new request initiate a new TCP connection ?

1 Reply

  • How can the same event exist more than once within a single iRule ?

     

    It can't, but the same event can exist in multiple iRules applied to the same VIP.

     

    Is 'current TCP connection' refer to a session that is maintained across multiple request-response sequences from a given client-browser ? Or does each new request initiate a new TCP connection ?

     

    That generally depends on a few things, including the application and specific HTTP version. For example, prior to HTTP 1.1, unless a keep-alive was specifically established, a single HTTP request (and corresponding response) constituted a single TCP session. With 1.1 a TCP session can handle multiple HTTP requests. There's no real guarantee though, so always better to assume each HTTP request is atomic.