Tuesday, December 14, 2010

Configuring Load Balancer and Shared Application Tier for multiple Forms/Web Tier nodes

Configuring Load Balancer and Shared Application Tier for multiple Forms/Web Tier nodes




In this post I will describe the procedure to implement Http Layer load balancer for forms/web tier nodes. This also covers the method to setup your second forms/web tier node from the already running one forms/web node. The following picture describes what we will achieve:

Shared Application Tier

Assumptions:

1. There is already a Forms/web node running. This node will be called primary node.
2. The second node has already been setup and it is exactly similar in configuration to primary node i.e. OS version e.g. Red hat 4.0, OS kernel Parameters, OS patches, OS packages. This node will be called secondary node.
3. The secondary node is in the same network and has all the network related settings already done i.e. Assigned name, had an entry in DNS servers already. There should be ability to NFS mount application tier filesystems from primary node to secondary node.
4. You have setup your hardware level HTTP load balancer (e.g. Cisco, Big IP etc) and it is setup in your network (DNS entries, Ip adress setting have been done already etc..)

Steps:

1. Sharing your existing application file system with secondary node.

a. Verify Software versions: Before doing anything make sure you have the following softwares/patches
i. AD minipack H or higher (patch 2673262)
ii. ADX should be 11i.ADX.E.1 Feb 2005 Consolidated Update. (patch 4175764)
iii. iAS should be Oracle HTTP Server Rollup 4 (patch 3072811)
iv. Developer 6i patchset 16 or higher
v. Oracle Universal Installer should be 2.2.0.19: Apply patch 4017155 to each iAS ORACLE_HOME to have OUI version 2.2
vi. Apply patch 4104924 to each APPL_TOP in the application tier to have TXK AutoConfig Templates to RUP K.
vii. Apply patch 3219567 to each APPL_TOP in the application tier. This patch is included in 11.5.10.
viii. Zip version 2.3

b. Implement AutoConfig if you have not done yet : See metalink note:165195.1

c. Rename the Applications context file: If the Applications system was created with Rapid Install version 11.5.8 or earlier, you must regenerate the Applications context file:
i. cd /bin
ii. perl adclonectx.pl sharedappltop contextfile= Context file name
iii. Running adclonectx.pl creates a new Applications context file named SID_Hostname.xml

d. Run AutoConfig to enable shared file system
i. Run these commands on the primary node where you are enabling shared file system support. After performing this step, re-load your environment settings.
ii. cd /admin/scripts/CONTEXT_NAME
iii. adstpall.sh apps/apps pass
iv. cd FND_TOP/patch/115/bin
v. perl -I AU_TOP/perl txkSOHM.pl

The script prompts for the following information:

Script Prompt

Important thing to note here is Configuration_top. There is an application environment variable called IAS_CONFIG_HOME which will be set to value of Configuration_top that you will provide. For non shared nodes this variable is set to IAS_ORACLE_HOME value. The perl script txkSOHM.pl that you ran above will create the following directories in IAS_CONFIG_HOME:
a. network (all tnsnames.ora etc)
b. Apache (apache config files)
c. oem_webstage (for oem conf files)
d. soap (Jserv soap conf files)
Please note that now your Apache configuration and log directories are under IAS_CONFIG_HOME and not IAS_ORACLE_HOME. This way oracle has placed IAS related configurations to separate directories for the nodes that will be sharing one IAS_ORACLE_HOME, this avoiding any conflict that may arise out of running same executable from two separate machines.

Adding the secondary node to a shared file system:

a. Execute Rapid clone on existing node.
i. cd COMMON_TOP/admin/scripts/CONTEXT_NAME
ii. perl adpreclone.pl appsTier

b. NFS mount the application tier files from primary node to secondary node.
Please note there is a specific way to NFS mount. Please see my blog post in wierdos sections:
NFS mounts with Shared Application Tier
c. Configure the node you want to add: On the secondary node login as applmgr and do the following.
i. cd AD_TOP/bin
ii. perl adclonectx.pl sharedappltop contextfile= Application Context file for existing node
iv. cd FND_TOP/patch/115/bin
v. perl -I AU_TOP/perl txkSOHM.pl

The script will prompt you same question as mentioned above. The only difference is that this time you have to mention “Type of Instance” as “secondary”

At this point your second node is added and ready to run. You can test it by bringing up services on it. Please note that since load balancer is not yet configured, you can only use one node at a time.

Setup HTTP layer Load Balancer the for two nodes
1. Create a web entry point : When you setup your hardware level load balancer there is an option to specify for which URL this load balancer is configured. For example: http://navdeep.practicalappsdba.com. This URL is your “web entry point”. Also make sure that suitable option should be chosen to ensure that the load-balancer sends all the requests from one client session to the same Web Server Node, this is also called as session persistency or “stickyness”. At present oracle supports “Cookie based” and “IP address based” stickyness. Please consult your sysadmins/harware fols for Loadbalancer to know more about which stickyness is available for you.
2. On each Web server node, run the AutoConfig Context Editor : In the Context Detail screen, set the following configuration values:
a. “Web entry point Host” to the HTTP load-balancer machine name.
b. “Web entry point Domain” to the HTTP load-balancer domain name
c. “Web entry protocol” to the HTTP load-balancer protocol e.g. “http” or “https”
d. “Active Web Port” to the value of the HTTP load-balancer’s external port
e. “Login Page” to include “Web entry protocol”://“Web Host entry point”.“Web domain entry point”:“Active Web Port”

a. Here is an example values you will want to give:
i. Web entry point Host = navdeep
ii. Web entry point domain = practicalappsdba.com
iii. Web entry protocol = http
iv. Active Web Port = 8001
v. Login Page = http://navdeep.practicalappsdba.com:8001
3. Run Autoconfig on both the nodes.
4. Bring up the services on both the nodes and change your login URL to the one mentioned above e.g. http://navdeep.practicalappsdba.com:8001, try to login and see if everything is working.

At this point you have implemented shared application tier between your two nodes and placed Http based Hardware load balancer in front of them. If your implementation includes configurator then you will have to enable load balancing at the Apache JServ layer even if your hardware load balancer is configured to maintain session persistency. I will talk about Apache Jserv load balancer in my future post, till then keep reading my posts and good luck ……….

------------------------------------------------------------------------------------
Source :- http://practicalappsdba.wordpress.com/category/for-master-apps-dbas/
------------------------------------------------------------------------------------

No comments:

Post a Comment