101 · Question #217
A virtual server is listening at 10.10.1.100:80 and has the following iRule associated with it: when HTTP_REQUEST { if { [HTTP::header UserAgent] contains "MSIE" } { pool MSIE_pool } else { pool Mozil
The correct answer is B. Mozilla_pool. The iRule checks the User-Agent header for 'MSIE'; since the request does not contain 'MSIE', the else clause routes it to Mozilla_pool.
Question
A virtual server is listening at 10.10.1.100:80 and has the following iRule associated with it:
when HTTP_REQUEST { if { [HTTP::header UserAgent] contains "MSIE" } { pool MSIE_pool } else { pool Mozilla_pool } which pool will receive the request.
Options
- AMSIE_pool
- BMozilla_pool
- CNone. The request will be dropped.
- DUnknown. The pool cannot be determined from the information provided.
How the community answered
(34 responses)- A15% (5)
- B74% (25)
- C3% (1)
- D9% (3)
Why each option
The iRule checks the User-Agent header for 'MSIE'; since the request does not contain 'MSIE', the else clause routes it to Mozilla_pool.
MSIE_pool is only selected when the User-Agent header explicitly contains 'MSIE', identifying an Internet Explorer client, which is not the case for this request.
The iRule evaluates HTTP::header UserAgent for the string 'MSIE', which identifies Internet Explorer. Because the request does not carry an MSIE User-Agent, the if condition evaluates to false and the else branch executes, directing the request to Mozilla_pool. This illustrates how F5 iRules use HTTP::header to perform content-based pool selection.
The request is not dropped because the iRule's else clause always provides a fallback pool, ensuring every request receives a destination.
The pool can be determined from the iRule logic alone - any request without 'MSIE' in the User-Agent header is unconditionally routed to Mozilla_pool by the else clause.
Concept tested: F5 iRule HTTP header content-based pool selection
Source: https://clouddocs.f5.com/api/irules/HTTP__header.html
Topics
Community Discussion
No community discussion yet for this question.