nerdexam
F5

201 · Question #308

A virtual server at 10.10.1.100:80 has the rule listed below applied. when HTTP_REQUEST { if {[HTTP::uri] ends_with "htm" } { pool pool1 } else if {[HTTP::uri] ends_with "xt" } { pool pool2 } If a

The correct answer is B. pool2. The iRule applies conditional logic based on the HTTP URI's ending, directing requests ending with 'xt' to pool2.

Section 7: Configure Advanced Features

Question

A virtual server at 10.10.1.100:80 has the rule listed below applied. when HTTP_REQUEST { if {[HTTP::uri] ends_with "htm" } { pool pool1 } else if {[HTTP::uri] ends_with "xt" } { pool pool2 } If a

Options

  • Apool1
  • Bpool2
  • CNone. The request will be dropped.
  • DUnknown. The pool cannot be determined from the information provided.

How the community answered

(37 responses)
  • A
    14% (5)
  • B
    78% (29)
  • C
    3% (1)
  • D
    5% (2)

Why each option

The iRule applies conditional logic based on the HTTP URI's ending, directing requests ending with 'xt' to pool2.

Apool1

'pool1' would only be selected if the HTTP URI ended with 'htm', which is not the case based on the correct answer.

Bpool2Correct

The iRule uses an 'else if' condition that directs traffic to 'pool2' if the HTTP URI ends with 'xt'. Given that 'pool2' is the correct answer, the client's request URI must have satisfied this condition.

CNone. The request will be dropped.

The request will not be dropped because the iRule includes explicit 'pool' commands for matching URI patterns, ensuring traffic is directed to an appropriate pool.

DUnknown. The pool cannot be determined from the information provided.

The pool can be definitively determined by evaluating the `HTTP::uri` against the specified 'if-else if' conditions within the iRule.

Concept tested: iRule conditional pool selection based on HTTP URI

Source: https://clouddocs.f5.com/api/irules/HTTP__uri.html

Topics

#iRules#HTTP_REQUEST event#HTTP::uri#pool selection

Community Discussion

No community discussion yet for this question.

Full 201 Practice