Saturday, October 16, 2010

Horizontal Clustering : step by step

Cluster across multiple physical machines


Horizontal clustering involves running multiple Java application servers that are run on two or more separate physical machines.


like shown below where all the managed servers are in a cluster -

Machine-1
- Admin Server
- MS-1
- MS-2
Machine-2
- MS-3
- MS-4



How to do Horizontal Clustering ?

1. Install weblogic server on both machines with same installation directories.
2. Create domain on primary machine where you want your Admin server and copy domain to second machine.

Step by Step -

1. Install weblogic server on both machines with same installation directories. ( see my other post on installation )

2. Start domain wizard on primary & select option "create a new weblogic domain"

















3. Select default first option

















4. Enter a name for your domain





















5. Enter Admin Server credentials, username & password















6. Select your mode ( development or production ) and jdk you want to use

















7.Select below two options




















8. If you want, update your Admin Server Name, listen address, port & enable ssl if required



















9.Add the number of managed servers you want for your domain, enter listen address, port & ssl information if required.




















10. Create cluster




















11. Assign all managed servers to the cluster ( click on each server one by one and click on right arrow )
















12. This is the turning point for horizontal clustering -

     Create two machines ( usually create it with the name of machines, suppose you ant clustering between to machines with hostname like hostname1.something.com &   
     hostname2.something.com, then create machine names like hostname1 & hostname2 )
      
      Enter listen address of particular machine ( server ), like for mac1 enter listen address of 
      hostname1.something.com & for mac2, enter listen address of hostname2.something.com )
      
     Enter port for nodemanager





















13. Assign MS1 & MS2 to mac1 & MS3 & MS4 to Mac2, this will allow nodemanager to start managed  server 1 & 2 on machine1 ( hostname1.something.com ) and start managed server 3 & 4 on machine 2 (  hostname2.something.com )





















14. Select create button.





















Now go to Middleware Directory,  D:\Oracle\Middleware, make a copy of user_projects, copy it under same folder on another machine ( D:\Oracle\Middleware on machine 2 ).

Now start your managed servers


that's it.

Cheers!!

6 comments:

  1. nice quick explanation...
    just a small typo in step 13.
    "start managed server 2 & 4 on machine 2" in place of "start managed server 3 & 4 on machine 2"

    Regards,
    SanjayMD

    ReplyDelete
  2. Great information. Thank you

    ReplyDelete
  3. Thanks to your kind hart.

    ReplyDelete
  4. Very usefull information,Thanks

    ReplyDelete
  5. thank u very much mukesh ji..

    ReplyDelete
  6. Wow very nice explanation,
    while reading i got a feeling like u r teaching to me...

    ReplyDelete