![Coyote Point Systems E350GX Скачать руководство пользователя страница 213](http://html.mh-extra.com/html/coyote-point-systems/e350gx/e350gx_installation-and-administration-manual_2674414213.webp)
General Match Expressions and Match Bodies
Equalizer Installation and Administration Guide
211
General Match Expressions and Match Bodies
A match rule 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 names. All match names within a cluster must be unique.
Match Expressions
Match expressions affect the subsequent processing of the request stream using URI, host, or other information.
Match expressions 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, (sometimes), 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:
NOT
expression
giving rise to the next simplest example:
NOT any()
which always evaluates to
false
and always results in the match rule not being selected.
With the addition of the logical OR (
||
) and logical AND (
&&
) operators, you can specify complex expressions,
selecting precise attributes from the request, as in this:
NOT happy() || (round() && happy())
Match expressions are read from left to right. Expressions contained within parentheses get evaluated before other
parts of the expression. The previous expression would match anything that was not happy or that was round and
happy.
Unlike the previous example, match functions correspond to certain attributes in a request header.
For example, a request URI for a web page might look like this:
Get /somedir/somepage.html http/1.1
Accept: text/html, text/*, *.*
Accept-Encoding: gzip
Host: www.coyotepoint.com
User-Agent: Mozilla/4.7 [en] (Win98; U)
Note –
The the logical negation operator is displayed as “NOT”, rather than “!”.
Содержание E350GX
Страница 18: ...Chapter Preface 18 Equalizer Installation and Administration Guide ...
Страница 38: ...Chapter 1 Equalizer Overview 38 Equalizer Installation and Administration Guide ...
Страница 50: ...Chapter 2 Installing and Configuring Equalizer Hardware 50 Equalizer Installation and Administration Guide ...
Страница 62: ...Chapter 3 Using the Administration Interface 62 Equalizer Installation and Administration Guide ...
Страница 80: ...Chapter 4 Equalizer Network Configuration 80 Equalizer Installation and Administration Guide ...
Страница 110: ...Chapter 5 Configuring Equalizer Operation 110 Equalizer Installation and Administration Guide ...
Страница 208: ...Chapter 7 Monitoring Equalizer Operation 208 Equalizer Installation and Administration Guide ...
Страница 240: ...Chapter 8 Using Match Rules 238 Equalizer Installation and Administration Guide ...
Страница 258: ...Chapter 9 Administering GeoClusters 254 Equalizer Installation and Administration Guide Envoy Configuration Worksheet ...
Страница 262: ...Appendix A Server Agent Probes 258 Equalizer Installation and Administration Guide ...
Страница 274: ...Appendix B Timeout Configuration 270 Equalizer Installation and Administration Guide ...
Страница 280: ...Appendix D Regular Expression Format 276 Equalizer Installation and Administration Guide ...
Страница 296: ...Appendix E Using Certificates in HTTPS Clusters 292 Equalizer Installation and Administration Guide ...
Страница 310: ...Appendix F Equalizer VLB 306 Equalizer Installation and Administration Guide ...
Страница 318: ...Appendix G Troubleshooting 314 Equalizer Installation and Administration Guide ...