Wednesday, June 11, 2008

Load Balancer in Oracle Apps 11i , E-Business Suite

What is Load Balancer in Oracle Applications 11i ?
As name suggest its used to balance load on oracle applications, so lets say you initially sized (How to size server configuration in your apps 11i Instance during Implementation coming soon..) your server for 100 concurrent users & now additional 90 users started using your system , you can configure one more Application Tier node & distribute load of 190 users across two application tier node by configuring load balancer (Currently I am discussing only about Application Tier & once you are comfortable with Middle Tier I'll discuss on database tier)


Why I need load balancer in Apps 11 ?
Is Increased load only reason for introducing load balancer in Apps 11i , No not at all . There are other reasons as well like (These are more advanced reasons & if you don't understand don't worry read it for understanding purpose at this minute)
- You want to Hide Server Name so instead of users accessing it via http://hostname:port you want users to access by http://somefancyname.com use load balancer (I know you can do this by various other ways as well like reverse proxy, via dns ..)
- You want on some node only web server & some both form server & web server
and there can lot of other reason why you need load balancer (May be you want to put it in your CV that you know how to configure load balancer, I know this is stupid reason :) )

What is Role of Load balancer in Oracle Application 11i ?
Usually load balancer act as mediator in passing your request to respective Middle Tiers (Usually web server ), so lets say you have configured load balancer in front of two middle tier which are part of your Applications 11i lets call them MT1 & MT2 . Load balancer will accept client's request and pass on to MT1 & MT2 ( round robin or the way you have configured load balancer, you here is Unix Administrators)

What are different kind of load balancer ?
Session Persistent - These kind of load balancers assign request from a client to same Application Tier. so lets say user1 tried connecting applications via load balancer and LB sent that request to MT1 then in future LB will send requests from user1 always to MT1 for time being specified in session persistence duration parameter specified in LB configuration or till user logs out from Applications. This property is called as Stickness or sticky Bit

Non Session Persistent - These kind assign request to MT in round robin way so lets assume user1 requested for login page , LB sends this request to MT1 then user1 again clicked on user responsibility and this time LB sent request from user1 to second middle tier i.e. MT2
Other types of LB, I am not discussing here as these are not required at this minute

What all different kind of load balancing options available in Oracle 11i ?
DNS Level Load Balancing ( Check image at top , this represent DNS level LB)
HTTP Layer Load balancing (You need hardware load balancer which accepts http requests)
Jserv Load balancing (This is example of software load balancer, via mod_oprocmgr Process Manager Module)
Forms level load balancing - Jserv load balancing via forms servlets (More coming in future) , forms metrics server adfmsctl.sh

This is HTTP Server level Hardware Load balancer.
Before configuring Load balancer in Oracle Apps , you should be familiar with following technologies
1. Cloning
Check my previous post to know about cloning
Cloning Basics
Cloning Part I
Cloning Part II
Metalink Note # 230672.1 Cloning Oracle Applications Release 11i with Rapid Clone
2. Load Balancer Basics
Check my previous post for Over of Load balancer
Load Balancer Overview
3. Autoconfig
Check About Autoconfig on My Site
Metalink Note 165195.1 Using AutoConfig to Manage System Configurations with Oracle Applications 11i

Broad Level steps for configuring Hardware Load balancer at HTTP Server layer
A. Configure Hardware Load Balancer for Session Persistence
B. Apply Prereq. Patch (If you are not on 11.5.10 or higher)
C. Add additional Web Node using Rapid Clone
D. Configure Load balancer on Node1
E. Test Load balancer via Node1
F. Configure Load balancer on Node2
G. Test Load balancer via Node2
H. Test Load balancer is sending requests to both nodes when both Web Nodes are Up

Yesterday I posted that you need extra attention while configuring Load balancer at HTTP layer is about Session Persistence - Hardware level Load Balancer should be configured for session persistence also called as stickness or sticky bit for Oracle Apps 11i . If this is not set & lets assume client1 first request went to Node1 after authentication if next request for client1 goes to Node2 who is not aware of client1 's previous request will throw authentication again. Don't worry about how to set it, ask vendor or Unix Administrator to set sticky bit or session persistence .
Now you have broad overview of configuring Load balancer at HTTP layer, I'll discuss in detail why you need to apply above patches & what all step by step configuration and parameters which needs to be changed and reasoning behind those changes . Till then check for Cloning, Autoconfig.
I am going to cover most common load balancer setup in Oracle Apps 11i i.e. Setup Two or more Middle tier with Web Server & Form Server with Hardware Load balancer in front of middle tier . This type of setup is also called as "HTTP Layer Hardware Load balancing" in Oracle Applications.
For overview & basics of Load balancing visit my previous post at

http://becomeappsdba.blogspot.com/2006/09/configure-load-balancer-in-oracle-apps.html

http://becomeappsdba.blogspot.com/2006/09/configure-hardware-load-balancer-at.html

Below are steps you need to follow to configure Multiple Middle Tier (Web & Forms Server ) with Hardware Load balancer in front.
1. Setup a Load balancer such that it forwards requests to first middle tier only.
2. Make sure sticky bit is set on load balancer for session persistence (Check Load balancer documentation), You can Network level switch as well to send requests to multiple middle tier
3. Apply Prereq. patches (3175852, 3077386, 3209878)
4. Edit following entry in XML or Context File directly ($APPL_TOP/admin/$CONTEXT_NAME.xml) or via Oracle Application Manager
-- 4.1 "Web entry point Host" to the HTTP load-balancer machine name
-- 4.2 "Web entry point Domain" to the HTTP load-balancer domain name
-- 4.3 "Web entry protocol" to the HTTP load-balancer protocol e.g. "http" or "https"
-- 4.4 "Active Web Port" to the value of the HTTP load-balancer's external port
-- 4.5 "Login Page" to include "Web entry protocol"://"Web Host entry point"."Web domain entry point":"Active Web Port"
-- 4.6 "disco_machine" to load balancer machine
5. Run Autoconfig
6. Start Services & check if you can login to applications via Load balancer
7. Now clone this middle tier to another node (where you want to add another node)
8. Make sure above parameter are pointing to load balancer in second node as well
9. Change load balancer to point to second node only
10. shutdown services on first node
11. try accessing application from second node (you should be able to access application without issues)
11.1 -- If forms are not opening properly , check "ICX Form Launcher .." Profile option should point to load balancer
12. Now start application on both middle tier
13. Point load balancer to both middle tier
14. You should be able to access applications

No comments: