Chapter 8: Using Match Rules
236
Equalizer Installation and Administration Guide
Using the Custom Load Balancing Policy with Match Rules
The
policy
drop down box in a match rule allows you to select an alternate load balancing policy for requests
selected by the match rule. While the
custom
policy is an available choice for
policy
in a match rule, the match rule
tab does not provide the controls used to set the specific custom load balancing behavior (see the section “LB Policy
Tab” on page 117 for a description of these controls).
In order to use the
custom
policy in a match rule, the
custom
policy should be selected as the policy for the cluster,
and match rules used to set any
other
policies. When the
custom
policy match rule matches a request, the
custom
policy will be used with the settings from the cluster configuration. The following example illustrates how to do this.
Let’s say that you want to serve most requests to a cluster using the
adaptive
load balancing policy, but want to load
balance requests to a particular URL using a
custom
policy. To do this, you would:
•
Set the
custom
policy in the cluster configuration (setting the slider controls to match your requirements).
This changes the
policy
specified on the
Default
match rule to
custom
.
•
Create a match rule that matches all requests that DO NOT specify the URL that you want to load balance
using the
custom
policy. In this match rule, specify the
adaptive
policy.
The following procedure shows you how to do this. In this example, we’ll assume that the
custom
policy is to be
used for requests to the URL
http://www.example.com/custom-page.html
, and the
adaptive
policy will be
used for all other requests.
1. Click the
cluster name
in the left frame, and open the
LB Policy
tab in the right frame.
a.
Select
custom
from the policy drop-down box.
b. Set the slider controls to reflect the relative importance of the load balancing pareameters.
c.
Click
commit
.
2. Right-click the name of the cluster and select
Add Match Rule
from the popup menu.
a.
Type in a
Match Name
or accept the default.
b. Select all of the
Servers
in the cluster.
c.
Click
commit
.
The new match rule is created and its
Configuration
tab is opened.
3. In the
expression
field, click on
any()
.
4. In the
Edit Match Rule
dialog:
a.
Select
replace with filename
from the drop-down box.
b. In the
filename
text box, type
custom-page.html
.
c.
Click
continue
.
5. Click on the
filename
function you just added in the
expression
field.
d. Select
negate function
from the drop-down box.
e.
Click
continue
.
The
expression
field should now look like this:
Содержание 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 ...