Web cache can be used as a loadbalancer .We have a lot of great tools in market for unix but very few for windows.Web cache is one of them.We will install web cache and check how it does the load balancing.
To install web cache we have to download the 10.1.2.0.2 version of SOA suite.Extract it and run the installer.
step1
========
step2
======
step3
======
step4
=========
step5
=======
step6
========
In this step you need to select the web cache
step7
======
step8
========
step9
========
step10
=======
step11
========
step12
=======
Now installing 10.1.2.0.2 itself is not ok you have to apply a patch 4569559 on top of your webcache to make it work.
To apply patch stop your web cache
go to SOA_HOME\opmn\bin and do a opmnctl stopall.
now open a command prompt and navigate till the patch 4569559
set your ORACLE_HOME and PATH
now do an opatch lsinventory if it works then go ahead and say opatch apply
it will apply the patch
Some where in the middle it may ask a permission just say n to that
So once it is complete it will say opatch succeded.Now you need to make one more configuration.
Go to SOA_HOME/webcache/internal.xml
make a back up of the file internal.xml and change it
Add an entry <LOADBALANCE ON="YES"/>
So that initially if your configuration file was looking like this
<CALYPSOINTERNALPARAMS>
<HEURISTICS CATELMFACTOR="0.0"/>
<CACHE/>
<SEARCHKEY/>
<INVALIDATION/>
<MEMORYMANAGER/>
<PPC/>
<MISCELLANEOUS/>
<OEMPERFTOOL/>
</CALYPSOINTERNALPARAMS>
After making the changes it should look like
<CALYPSOINTERNALPARAMS>
<HEURISTICS CATELMFACTOR="0.0"/>
<CACHE/>
<SEARCHKEY/>
<INVALIDATION/>
<MEMORYMANAGER/>
<PPC/>
<MISCELLANEOUS/>
<OEMPERFTOOL/>
<LOADBALANCE ON="YES"/>
</CALYPSOINTERNALPARAMS>
So now can log in to webcahce console.
Go to your SOA_HOME\install\portlist.ini and check for the Web Cache Administration port
now try to open the console using that port as
http://host:port
you will get to see a console with following in the screenon the right side
If asked for user id and pwd then by default for 10.1.2.0.2 series user is ias_admin and password will the one that you have provide at the time of installation.
Now select the OracleASWebCacheManager and log in to the web cache console.
once you will log in to the web cachce console.You should see the following at the right most top side.
Now in the left most panel you will find entries like
Now click on the origin servers and add the two host and port which you want to be load balanced.
Let suppose i have two application running on two different host and two different port
then i will click on add and then provide the details of both the host and port
capacity will be 100
failoverThreshold 5
Ping URL /
Ping interval 10
Protocol HTTP
Now once done just save the changes.
Now click on site to server mapping and select the option where in host name and port is defined.
Select and click on edit button
now select the two Select Application Web Servers which you have made entry in the previous steps.Make sure other entries are removed.So once this steps are completed your console should probably look like this
Save the changes and do a
opmnctl restartproc ias-component=WebCache
Now you should be able to login to the two console with the use of the load balancer URL which in my case is arahi-pc1.idc.abc.com
So if i will type in my browser http:\\arahi-pc1.idc.abc.com:7777
it will either redirect to
http:\\arahi-pc1.idc.abc.com:80
or http:\\arahi-pc2.idc.abc.com:7777
So your loadbalancer is ready.You can access the application on the two defined application web server using the sigle URL of loadbalancer.
No comments:
Post a Comment