Configure the on demand router for multi-cluster failover and load balancing routing
To configure the on demand router (ODR) to route requests to a different cluster, use custom properties for multi-cluster failover and load balancing routing policies. Route requests to a cluster in another cell if the primary cluster fails, to balance the load between multiple clusters in the environment, or to route requests to a specific cluster.
- Create the ODR for the cell. For more information, read about creating ODRs.
- Configure and deploy the clusters and applications for the multi-cluster policy.
- If the clusters are in different cells, configure the core group bridge so that they can communicate, or use a generic server cluster definition.
Use multi-cluster routing policies for failover and load balancing. With multi-cluster failover, we can specify a cluster to take over the workload when the primary cluster fails. With load balancing routing, we can balance the request loads between multiple clusters.
- Create a custom property for the multi-cluster routing policy. In the administrative console, click Servers > Server types > 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:
The recommendation for configuring multi-cluster failover and load balancing routing policies is through the wsadmin tasks, unless you already have it configured through a custom property. For more information, read about rules for ODR routing policy administrative tasks.
Option Description MCRP 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 Name of the cell. This cell must be a valid cell that runs WebSphere Application Server. The case and spelling must match the WAS configuration. $ Separates the WAS objects. application_name 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 Name of the Web module without the .war file extension. cluster_name Name of the cluster in which the application is deployed. [ ] Indicates variables that are optional.
- Type a value in the Value field. The full syntax of the value field follows:
Option Description policy_type
The policy_type value is not case sensitive. The failover, wlor, or wrr values can be specified in uppercase or lowercase.
failover: When a request for the application Web module in the cell specified in the Name field fails, the request fails over to the cell and cluster specified in the Value field after the @ symbol. Requests route only to the configured cell and cluster when the primary cell is down. The cell status is indicated by an HTTP status code of 503, service unavailable.
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. This load balancing policy not only considers weights, but also how many outstanding HTTP requests exist in a cluster. This policy will more efficiently distribute requests to clusters that can handle them. wlor is recommended over wrr.
New weight values are obtained every 15 seconds from the dynamic workload 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.
The default behavior of the ODR is to perform wlor load balancing across cells and clusters if a request does not match an existing ODR routing rule or if no ODR routing rules exist
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.
New weight values are obtained every 15 seconds from the dynamic workload 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
cell_name Name of the cell. This cell must be a valid cell that runs WebSphere Application Server. The case and spelling must match the cell name in WebSphere Application Server. cluster_name
The cluster name value must be capitalized and spelled the same way that specified the name when creating the cluster in the administrative console.
, The comma (,) is used to separate a set of values in the list.
All Java EE artifact names such as cell_name, application_name, and cluster_name must be spelled the way that they were spelled in the WAS configuration.
The cell_name and cluster_name values in the Name or Value field can be a wildcard (*). If we use the wildcard in place of a cell name, all the cells in the cell group are indicated. A cell group is defined by any cells that are bridged together with the core group bridge. If we use the wildcard in place of the cluster_name value, all of the clusters in a given cell are indicated. Using a wildcard value is only relevant when we are using multi-cluster load balancing routing.
Examples for the value field follow: The following policy configures a failover policy. When a failure occurs, the requests can fail over to the myGSC1 generic server cluster in the thesaharaCell01 cell:
The following policy configures a weighted least outstanding request load balancing policy.
The following policy configures a weighted round robin policy.
The following value balances load across all of the cell and cluster combinations where the configured application is deployed.
- Click Apply or OK to commit the new custom settings.
ResultsThe ODR routes to multiple clusters, as you configured in the multi-cluster routing policy.
Topology Configurations for Multi-Cell Routing Overview of request flow prioritization
Create ODRs Configure multi-cell performance management: Star Topology Proxy server settings
Intelligent Management: rules for ODR routing policy administrative tasks