
At left in the figure above are the expressions for the three match rules, shown in the order in which they are
configured in the cluster. At right, the decision tree describes how the match rules are evaluated for every client
request that comes into this cluster.
As described previously, the first match rule (ma01) is meant to match any request that does not have a directory
in it. Since this is our most common case, match rule evaluation will stop after the first match rule is evaluated for
the majority of incoming requests.
The second and third rules, ma02 and ma03, match for specific directory names. We match for the most common
directory name first, then the less common directory name.
Finally, if all three of the match rule expressions for ma01, ma02, and ma03 fail to match an incoming request,
then that request is load balanced across the server pool in the cluster using the options set on the cluster (and
mirrored in the Default match rule).
Match Rule Expressions and Bodies
Match functions and operators are used to construct the
expression
parameter found in a match rule. The
expression
parameter selects the requests to be processed using the parameters specified in the remainder of the
match rule.
Match Rule Expressions
Match rules consists of a
match expression
and a
match body,
which identifies the operations to perform if the
expression is satisfied by the request. Match syntax is as follows:
match name {expression} then {body}
Each match has a name, which is simply a label. The name must follow the same restrictions as those for cluster
names and server pool names. All match names within a cluster must be unique.
Match expressions affect the subsequent processing of the request stream using URI, host, or other information.
They are made up of match functions, most of which are protocol-specific, joined by logical operators, optionally
preceded by the negation operator, with sets of beginning and end parentheses for grouping where required. This
may sound complex, and it can be, but typical match expressions are simple; it is usually best from a performance
perspective to keep them simple.
The most simple match expression is one made up solely of a single match function. The truth value (
true
or
false
)
of this expression is then returned by the match function. For example, a match function common to all Layer 7
protocols is the any() function, which always returns
true
, independent of the contents of the request data. So, the
most simple match expression is:
any()
which will always result in the match rule being selected.
Use the logical NOT operator to invert the sense of the truth value of the expression. So, you can use the NOT
operator to logically invert a match expression, as follows:
Copyright © 2013 Coyote Point Systems. A subsidiary of Fortinet, Inc.
All Rights Reserved.
321
Equalizer Administration Guide
Kommentare zu diesen Handbüchern