Skip Headers

Oracle9iAS Wireless Getting Started and System Guide
Release 2 (9.0.2)

Part Number A90486-02
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

5
Load Balancing and Failover

This chapter discusses Oracle9iAS Wireless load balancing and failover and includes the following sections:

5.1 Overview

Oracle9iAS Wireless offers a scalable, reliable server infrastructure through clustering and high availability. The clustering structure includes the following two features.

5.2 Clustering Architecture

Each Wireless server process which runs on a single Java Virtual Machine (JVM) is referred to as a node. One or more nodes comprise an island. Nodes within an island are capable of serving the same applications, because the session for each client is replicated among all the nodes within an island in preparation of failover. One or more islands together form an OC4J (Oracle Containers for Java) instance for the purpose of load balancing. The entire OC4J instance is linked by mod_oc4j to a simple front-end, Oracle Http Server (OHS). Typically, an island has two to four nodes.

By default, the requests from the same client are always redirected to the same Wireless server process. If one process goes down, then the fault tolerance feature is supported for both stateful and stateless requests as follows:

5.3 Clustering Configuration

This section describes how to configure the Oracle Http Server (OHS), Oracle Process Management and Notification (OPMN), and Oracle Containers for Java (OC4J).

5.3.1 Configuring Oracle Http Server (OHS)

The configuration file for OHS is httpd.conf, which includes mod_oc4j.conf, located in $ORACLE_HOME/Apache/Apache/conf/ directory. The mounting point from HTTP request to the Wireless server clustering instance is specified in mod_oc4j.conf as follows:

LoadModule oc4j_module libexec/mod_oc4j.so
<IfModule mod_oc4j.c>
Oc4jMount /ptg OC4J_Wireless
Oc4jMount /ptg/* OC4J_Wireless
Oc4jMount /modules OC4J_Wireless
Oc4jMount /modules/* OC4J_Wireless
</IfModule>

When installing the Wireless server from Oracle Universal Installer (OUI), these lines should be automatically populated in mod_oc4j.conf file.

5.3.2 Configuring Oracle Process Management and Notification (OPMN)

The major configuration file for OPMN is opmn.xml, located in $ORACLE_HOME/opmn/conf/directory.

The oc4J oc4jInstanceID in opmn.xml should be the exactly same as it appears in the mounting specification of the mod_oc4j.conf. The number of islands, the number of processes, and the other configuration parameters are also defined within opmn.xml. A sample configuration is as follows:

<oc4j oc4jInstanceID="OC4J_Wireless" gid="OC4J_Wireless">
<config-file path="$ORACLE_HOME/j2ee/OC4J_Wireless/config/server.xml" />
<base-port ajp="0", jms="2402", rmi="2502" />
<island id="OC4J_WirelessIslandA" numProcs="2" />
<island id="OC4J_WirelessIslandB" numProcs="3" />
</oc4j>

For this OC4J_Wireless cluster, two islands (OC4J_WirelessIslandA and OC4J_WirelessIslandB) share the request workload. OC4J_WirelessIslandA is comprised of two wireless server processes while OC4J_WirelessIslandB is comprised of three Wireless server processes. Altogether, five ports are needed for each type of protocol. The port number range is from the base-port number to the base-port number plus five. The base-port numbers are dynamically allocated during the installation time.

By default, the Wireless server <oc4j> element should be populated within opmn.xml. However, the populated entry only supports single Wireless server process and thus is not suitable for load balancing and failover. The configuration for load balancing and failover must be manually added.

5.3.3 Configuring OC4J

The OC4J-related configuration files are located in $ORACLE_HOME/j2ee/OC4J_Wireless/config directory. The default configuration is set for running single Wireless server process.

To support load balancing and failover features, you must modify the the OC4J configuration files orion-web.xml and /WEB-INF/web.xml as described in the following steps.

  1. Modify orion-web.xml

    There are two orion-web.xml files, one for Wireless web server, one for the wireless modules. They are located in the following directories:

    • $ORACLE_HOME/j2ee/OC4J_Wireless/application-deployments/ptg/ptg-web/

    • $ORACLE_HOME/j2ee/OC4J_Wireless/application-deployments/modules/modules-web/

    For both of these files, add the following to the main body of the <orion-web-app> tag:

    <cluster-config />
    
    
  2. Modify /WEB-INF/web.xml

    There are two web.xml files, one for Wireless web server and one for the Wireless modules. They are located in the following directories:

    • $ORACLE_HOME/j2ee/OC4J_Wireless /applications/ptg/ptg-web/WEB-INF/

    • $ORACLE_HOME/j2ee/ OC4J_Wireless /applications/modules/modules-web/WEB-INF/

    For both of these files, add the <distributable /> tag to the main body of <web-app>

5.4 High-Availability for Wireless

In Oracle9iAS 9.0.2, wireless applications cannot be clustered using the Oracle9iAS clustering mechanism. However, you can configure Oracle9iAS 9.0.2 to achieve a high-availability deployment by completing the following steps.


Note:

You must back up all files before you modify them. 


  1. Install the Oracle9iAS 9.0.2 Infrastructure tier on one machine and install multiple middle-tiers on separate machines. Ensure that each of these middle-tier installations point to the infrastructure tier.

  2. Shut down DCM and all process by running the command

    [oracle home]/dcm/bin/dcmctl stop

  3. Shut down Oracle Enterprise Manager (OEM) by running the command

    [oracle home]/bin/emctl stop

  4. Verify that the file [oracle home]/opmn/conf/ons.conf exists on each of the mid-tiers. Verify that the infrastructure tier contains IP-address entries for all the other tiers. If not, file and add missing IP-address entries.

  5. On each middle-tier, increase the number of processes that need to participate in the default island for the OC4J_Wireless OC4J instance to the desired number.

    This can be done from the EM console or by modifying the file:

    [oracle home]/opmn/conf/opmn.xml.

    For details and concepts of OC4J instance and OC4J islands, refer to the OC4J Administration Guide. For instance, if you modify opmn.xml, a typical entry to start four OC4J processes in the default island would be of the form:

    <oc4j maxRetry="3" instanceName="OC4J_Wireless" gid="OC4J_Wireless" numProcs="4">

  6. In the mod_oc4j configuration file for each middle-tier (that is, [oracle home]/Apache/Apache/conf/mod_oc4j.conf), modify the mount-point entries for the Wireless runtime. If two mid-tiers [M1 and M2] are used, the entries should be of the form:

    Oc4jMount /ptg instance://m1.c1.mysite.com:OC4J_Wireless,m2.c2.se4637-u-sr006.us.oracle.com:OC4J_Wireless

    and

    Oc4jMount /ptg/* instance://m1.c1.mysite.com:OC4J_Wireless,m2.c2.se4637-u-sr006.us.oracle.com:OC4J_Wireless

    c1 and c2 are the respective Oracle9iAS 9.0.2 instance names. You determine instance names by running the command:

    [oracle home]/dcm/bin/dcmctl whichInstance.

    These entries should be exactly the same for all middle tier machines.

  7. Run [oracle home]/dcm/bin/dcmctl updateConfig to update the DCM repository with the configuration file changes.

    On slow machines, a DCM error (timeout) of the form ADMN-906005 may appear. If this occurs, run the command [oracle home]/dcm/bin/dcmctl getReturnStatus and wait until the command exits. This confirms that the changes have been propagated to the DCM repository.

  8. Add the tag <cluster-config/> under the <orion-web-app> tag in the file [oracle home]/j2ee/OC4J_wireless/application-deployments/ptg/ptg-web/orion-web.xml.

  9. Start DCM and all processes by running the command

    [oracle home]/dcm/bin/dcmctl start.

  10. Start EM by running the command

    [oracle home]/bin/emctl start

  11. Configure a hardware load-balancer to point to the middle-tiers.

Currently, high-availability support is only available for the core server runtime (by default mapped to the URI /ptg/rm).

For more information, refer to the OC4J documentation.


Go to previous page Go to next page
Oracle
Copyright © 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index