Specifications

Example Match Rules
Equalizer Installation and Administration Guide 139
Example Match Rules
This section shows you how to create a few of the most commonly used types of match rules:
“Parsing the URI” on page 139
“Disabling Persistent Connections for One or More Servers” on page 140
“Dedicated Image and Content Servers” on page 142
Parsing the URI
In this example, we want to direct requests to a particular server based on the hostname used in the
URI contained in the request. We want all requests for URIs that start with “support” to go to one
server, and all other requests that do not match this rule to be load balanced across all servers in the
cluster.
To do this, we will construct one match rule that parses the URI; if the URI contains the string
support”, it forwards the request to the server sv_support. For this example, we assume that a
cluster with four servers (sv_support, sv_01, sv_02, sv_03) has already been defined.
1. Log into the Equalizer Administration Interface in Edit mode.
2. In the left frame, click the name of the Layer 7 cluster to which you want to add the rule. The
cluster screen appears in the right frame.
3. In the cluster screen, select menu > Add Match Rule. The create match rule screen appears
in the right frame.
4. Type support into the match name text box.
5. In the Construct match expression field, select replace with host_prefix from the drop-down
list box, and then select continue.
replace with any AND function Replaces the currently selected function or logical construct with
the “any()” function logically AND’ed with the current selection.
replace with any OR function Replaces the currently selected function with the “any()” function
logically OR’ed with the current selection.
replace with function AND any Replaces the currently selected function with the current
selection logically AND’ed with the “any()” function.
replace with function OR any Replaces the currently selected function with the current
selection logically OR’ed with the “any()” function.
swap left and right When a logical operator is selected (i.e., AND or OR), switches
the order of the left and right sides of the logical expression (e.g.,
“A AND B” becomes
“B AND A”).
replace with left When a logical operator is selected (i.e., AND or OR), replaces
the entire logical expression with the left side of the logical
expression (e.g., “A AND B” becomes “A”).
replace with right When a logical operator is selected (i.e., AND or OR), replaces
the entire logical expression with the left side of the logical
expression (e.g., “A AND B” becomes “B”).
Table 65: Match Rule Logical Operators and Constructs