To configure the on demand router (ODR) to route requests to a
different cluster, you can configure custom properties for configuring multi-cluster
failover and load balancing routing policies. You might route requests to
a cluster in another cell if your primary cluster fails, to balance the load
in your environment between multiple clusters, or to direct the ODR to route
requests to a specific cluster.
Before you begin
Create the ODR for your cell. Configure and deploy the clusters and
applications for your multi-cluster policy.
About this task
Use multi-cluster routing policies for failover and load balancing.
With failover, you can specify a cluster to take over the workload when the
primary cluster fails. With load balancing routing, you can balance the request
loads between multiple clusters.
Procedure
- Create a custom property for the multi-cluster routing policy.
In the administrative console, click Servers > On demand routers > ODR_name > On
demand router properties > On demand router settings > Custom
properties > New.
- Type a name for the multi-cluster routing policy in the Name field.
The name must start with the token MCRP@ string. The full syntax
of the name field follows:
MCRP@<cell_name>[$<application_name>[$<web_module_name>]]
The following table defines
the components of the name field syntax:
Option |
Description |
MCRP |
Specifies that
the custom property is a multi-cluster routing policy (MCRP). This prefix
must be specified in uppercase letters. |
@ |
Required symbol. This
symbol is the separator between the policy name and the cell. In this configuration,
it is generally used to separate a policy name attribute from a cell name. |
cell_name |
Specifies
the name of the cell. This cell must be a valid cell that runs WebSphere® Application
Server. The case and spelling must match the way that you created the cell
in WebSphere Application
Server. |
$ |
Separates the WebSphere Application Server objects. |
application_name |
Specifies
the application name without the file extension. For example, if the enterprise
application name is StockTrade.ear, then specify StockTrade as
the application_name value. |
web_module_name |
Specifies
the name of the Web module without the .war file extension. |
[ ] |
Indicates variables that are optional. |
- Type a value in the Value field. The full syntax
of the value field follows:
<policy_type>@<cell_name1>$<cluster_name1>[,<cell_name2>$<cluster_name2>,...]
The
following table defines the components of the value field syntax:
Option |
Description |
policy_type |
Valid
values: failover: When a request for the application
web module in the cell that is specified in the Name field fails, the
request fails over to the cell and cluster that are specified in the Value field
after the @ symbol. Requests only route to the configured cell and
cluster when the primary cell is down. The cell status is signified by an
HTTP status code of 503, service unavailable. New weight values are
obtained every 15 seconds from the Dynamic Work Load Manager (DWLM), which
takes into account the application level response time. Use the mcrp.ui system
property to set the new update time in seconds.
wlor:
Specifies a weighted least outstanding request load balancing policy. This
policy comes into effect when the ODR is active and reads its custom property
configuration.
wrr: Specifies a weighted round-robin
load balancing policy. This policy comes into effect when the ODR is active
and reads its custom property configuration.
The policy_type value is
not case sensitive. The failover, wlor,
or wrr values can be specified in uppercase or lowercase.
|
cell_name |
Specifies
the name of the cell. This cell must be a valid cell that runs WebSphere Application
Server. The case and spelling must match the way that you created the cell
in WebSphere Application
Server. |
cluster_name |
The
cluster name values that are used in the value field must be generic server
cluster names, because the ODR MCRP routing to a remote cell is achieved without
compromising security concerns or the need to configure cross-cell communication
by using the generic server cluster implementation. While the cell on the
policyType can be the same as the primary cell (cell specified in the Name
field), the cluster name must be a generic server cluster name. MCRP routing
also maintains established session affinity.
The cluster name value must be capitalized
and spelled the same way that you specified the name when you created the
cluster in the administrative console.
|
, |
The comma (,) is used
to separate a set of values in the list. |
All Java™ 2 Platform Enterprise Edition (J2EE) artifact names
such as cell_name, application_name,
and cluster_name must be spelled the way that they were
created and deployed in WebSphere Application Server.
A few examples for the value field follow:
failover@thesaharaCell01$myGSC1
wlor@thesaharaCell01$myLondonGSC
wrr@thesaharaCell01$myNYCGSC
- Type some optional text in the Description field.
- Click Apply or OK to commit your new custom settings.
Results
The ODR routes to multiple clusters, as you configured in the multi-cluster
routing policy.
What to do next
You might want to
configure the ODR to route work to nodes that are not running WebSphere Extended
Deployment. After you create the ODR and apply any optional configuration
parameters, you can define the ability to route work to non-Extended Deployment
nodes.