101 · Question #85
How many events can be referenced in a given iRule?
The correct answer is B. iRules can have multiple events.. A single F5 iRule can contain multiple event declarations, allowing one rule to handle logic across different points in the connection lifecycle.
Question
How many events can be referenced in a given iRule?
Options
- AiRules are limited to one event, but a virtual server could be associated with multiple rules.
- BiRules can have multiple events.
- CExactly one.
- DiRules can have up to event if one is clientside and one is serverside.
How the community answered
(23 responses)- A4% (1)
- B87% (20)
- D9% (2)
Why each option
A single F5 iRule can contain multiple event declarations, allowing one rule to handle logic across different points in the connection lifecycle.
iRules are not limited to one event - multiple event blocks can exist in a single iRule, making the restriction described here incorrect.
F5 iRules are written in Tcl and support multiple event blocks within a single iRule file, such as CLIENT_ACCEPTED, HTTP_REQUEST, and SERVER_CONNECTED all coexisting in one rule. This lets administrators consolidate related logic into a single iRule rather than splitting it across multiple rules. There is no platform limit restricting a single iRule to only one event declaration.
The limit is not exactly one - iRules support as many event declarations as needed within a single script.
There is no such rule limiting iRules to two events based on clientside or serverside context - iRules support any number of events regardless of their direction.
Concept tested: F5 iRules multiple event declarations
Source: https://clouddocs.f5.com/api/irules/
Topics
Community Discussion
No community discussion yet for this question.