OFBiz4.0 clustering,session replication, failover and load balancing - Howto

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

OFBiz4.0 clustering,session replication, failover and load balancing - Howto

vignesh sabapathi
Hi OFBizers

After surfing the posts i could'nt find much info abt OFBiz4.0 clustering. Few members raised some issues in retaining shopping cart items during session replication. We are looking into that issue..

As an alternative i m posting here the way to do clustering and session replication in OFBiz4.0 by deploying OFBiz4.0 in external tomcat (By this way the shopping cart items can be retained)

Following are the steps to be done

step 1 : create a template (as same as for ofbiz9.0 deployment in tomcat)
step 2 : Deploy ofbiz in tomcat (i tried with tomcat 6.0.16)
step 3 : Cluster tomcat instances (i used 2 tomcat instances)
step 4:  Enable session replication by changing the configurations in server.xml file in all the nodes (use backup manager to retain cart items during session replication)
step 5 : Enable Apache with mod_jk support
step 6 : configure Apache (create worker.properties and change the configurations of httpd.conf and ssl.conf) to load balance tomcat servers
Step 7 : check all the functions are working with lamba probe tool

Hav a happy clustering

i wil try to upload a file detailing all the activities later on

by

vignesh sabapathi
mailto : vignesh.sabapathi@tcs.com
mobile : 9930081383
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz4.0 clustering,session replication, failover and load balancing - Howto

Chris Snow-3
Many thanks for this vignesh.  I look forward to your guide on the wiki!


vignesh sabapathi wrote:

> Hi OFBizers
>
> After surfing the posts i could'nt find much info abt OFBiz4.0 clustering.
> Few members raised some issues in retaining shopping cart items during
> session replication. We are looking into that issue..
>
> As an alternative i m posting here the way to do clustering and session
> replication in OFBiz4.0 by deploying OFBiz4.0 in external tomcat (By this
> way the shopping cart items can be retained)
>
> Following are the steps to be done
>
> step 1 : create a template (as same as for ofbiz9.0 deployment in tomcat)
> step 2 : Deploy ofbiz in tomcat (i tried with tomcat 6.0.16)
> step 3 : Cluster tomcat instances (i used 2 tomcat instances)
> step 4:  Enable session replication by changing the configurations in
> server.xml file in all the nodes (use backup manager to retain cart items
> during session replication)
> step 5 : Enable Apache with mod_jk support
> step 6 : configure Apache (create worker.properties and change the
> configurations of httpd.conf and ssl.conf) to load balance tomcat servers
> Step 7 : check all the functions are working with lamba probe tool
>
> Hav a happy clustering
>
> i wil try to upload a file detailing all the activities later on
>
> by
>
> vignesh sabapathi
> mailto : [hidden email]
> mobile : 9930081383
>
>  

Reply | Threaded
Open this post in threaded view
|

Re: OFBiz4.0 clustering,session replication, failover and load balancing - Howto

Anil Soni
Vignesh, same thing can also be done on embedded Tomcat also, we've
successfully implemented this on trunk.


Thanks & Regards,
Anil Soni
[hidden email]
Tel : 91-22-6795 4324
Mobile : 9930302283

______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz4.0 clustering,session replication, failover and load balancing - Howto

Chris Snow-3
Hi Anil,

Do Vignesh's instructions also work for trunk?  If not, is there any
documentation on how to do this in trunk?

Many thanks,

Chris


Anil Soni wrote:

> Vignesh, same thing can also be done on embedded Tomcat also, we've
> successfully implemented this on trunk.
>
>
> Thanks & Regards,
> Anil Soni
> [hidden email]
> Tel : 91-22-6795 4324
> Mobile : 9930302283
>
> ______________________________________________________________________
>  

Reply | Threaded
Open this post in threaded view
|

Re: OFBiz4.0 clustering,session replication, failover and load balancing - Howto

anil.soni
Chris,

  I haven't tried load balancing with external Tomcat server but I think
same will be work with trunk also.


On Wed, Nov 11, 2009 at 2:04 PM, Christopher Snow <
[hidden email]> wrote:

> Hi Anil,
>
> Do Vignesh's instructions also work for trunk?  If not, is there any
> documentation on how to do this in trunk?
>
> Many thanks,
>
> Chris
>
>
>
> Anil Soni wrote:
>
>> Vignesh, same thing can also be done on embedded Tomcat also, we've
>> successfully implemented this on trunk.
>>
>>
>> Thanks & Regards,
>> Anil Soni
>> [hidden email]
>> Tel : 91-22-6795 4324
>> Mobile : 9930302283
>>
>> ______________________________________________________________________
>>
>>
>
>


--
Anil Soni
+91-9930302283cell
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz4.0 clustering,session replication, failover and load balancing - Howto

c.schinzer
I've added Vignesh's short guide here:
http://docs.ofbiz.org/display/OFBIZ/Physical+Architecture+patterns+for+OFBiz

Since that's the place I think it may belong.
Alternatively (especially if people think this should be a separate HOWTO
guide), we could add this as a separate document and add a reference to it
on the abovementioned doc.

let me know

Regards


Carsten

2009/11/11 <[hidden email]>

> Chris,
>
>  I haven't tried load balancing with external Tomcat server but I think
> same will be work with trunk also.
>
>
> On Wed, Nov 11, 2009 at 2:04 PM, Christopher Snow <
> [hidden email]> wrote:
>
> > Hi Anil,
> >
> > Do Vignesh's instructions also work for trunk?  If not, is there any
> > documentation on how to do this in trunk?
> >
> > Many thanks,
> >
> > Chris
> >
> >
> >
> > Anil Soni wrote:
> >
> >> Vignesh, same thing can also be done on embedded Tomcat also, we've
> >> successfully implemented this on trunk.
> >>
> >>
> >> Thanks & Regards,
> >> Anil Soni
> >> [hidden email]
> >> Tel : 91-22-6795 4324
> >> Mobile : 9930302283
> >>
> >> ______________________________________________________________________
> >>
> >>
> >
> >
>
>
> --
> Anil Soni
> +91-9930302283cell
>



--

Best

Carsten Schinzer

Waisenhausstr. 53a
80637 München
Germany
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz4.0 clustering,session replication, failover and load balancing - Howto

Jacques Le Roux
Administrator
Hi Carsten,

Keep up the good work , I have added a link from the FAQ (Production section)

Thanks

Jacques

From: "Carsten Schinzer" <[hidden email]>
I've added Vignesh's short guide here:
http://docs.ofbiz.org/display/OFBIZ/Physical+Architecture+patterns+for+OFBiz

Since that's the place I think it may belong.
Alternatively (especially if people think this should be a separate HOWTO
guide), we could add this as a separate document and add a reference to it
on the abovementioned doc.

let me know

Regards


Carsten

2009/11/11 <[hidden email]>

> Chris,
>
>  I haven't tried load balancing with external Tomcat server but I think
> same will be work with trunk also.
>
>
> On Wed, Nov 11, 2009 at 2:04 PM, Christopher Snow <
> [hidden email]> wrote:
>
> > Hi Anil,
> >
> > Do Vignesh's instructions also work for trunk?  If not, is there any
> > documentation on how to do this in trunk?
> >
> > Many thanks,
> >
> > Chris
> >
> >
> >
> > Anil Soni wrote:
> >
> >> Vignesh, same thing can also be done on embedded Tomcat also, we've
> >> successfully implemented this on trunk.
> >>
> >>
> >> Thanks & Regards,
> >> Anil Soni
> >> [hidden email]
> >> Tel : 91-22-6795 4324
> >> Mobile : 9930302283
> >>
> >> ______________________________________________________________________
> >>
> >>
> >
> >
>
>
> --
> Anil Soni
> +91-9930302283cell
>



--

Best

Carsten Schinzer

Waisenhausstr. 53a
80637 München
Germany


Reply | Threaded
Open this post in threaded view
|

Re: OFBiz4.0 clustering,session replication, failover and load balancing - Howto

Neha Mehta
Hi,

I have successfully load balanced OFBiz on Windows XP, but i am facing
problem, when Apache http Server is on Linux machine.
I feel there is problem with mod_jk.so connectivity. Could you please let
me know, is mod_jk.so platform dependent?? Will the same mod.jk.so that i
used for Windows work on Linux too??


Thanks & Regards,
Neha Mehta
Software Engineer (A-1-1)
Larsen & Toubro Infotech Ltd.
Cell: +91 97694 72267
Email-id: [hidden email]
EL-200, TTC Electronic Zone,
Shil Mahape Road,
Navi Mumbai, 400710
T: +91 022 67954324
India +0530 UTC/GMT

**********************************************************************************************************************
The most beautiful thing is to see a person smiling…
And even more beautiful is knowing that you are the reason behind it!!!
  Be a reason for others to smile
HAVE A NICE DAY AHEAD......
**********************************************************************************************************************





Larsen & Toubro Infotech Ltd.
www.Lntinfotech.com

This Document is classified as:

L&T Infotech Proprietary   L&T Infotech Confidential   L&T Infotech
Internal Use Only   L&T Infotech General Business

This Email may contain confidential or privileged information for the
intended recipient (s) If you are not the intended recipient, please do
not use or disseminate the information, notify the sender and delete it
from your system.



Jacques Le Roux <[hidden email]>
11/12/2009 04:05 AM
Please respond to
<[hidden email]>; Please respond to
Jacques Le Roux <[hidden email]>


To
<[hidden email]>
cc

Subject
Re: OFBiz4.0 clustering,session replication, failover and load balancing -
Howto






Hi Carsten,

Keep up the good work , I have added a link from the FAQ (Production
section)

Thanks

Jacques

From: "Carsten Schinzer" <[hidden email]>
I've added Vignesh's short guide here:
http://docs.ofbiz.org/display/OFBIZ/Physical+Architecture+patterns+for+OFBiz


Since that's the place I think it may belong.
Alternatively (especially if people think this should be a separate HOWTO
guide), we could add this as a separate document and add a reference to it
on the abovementioned doc.

let me know

Regards


Carsten

2009/11/11 <[hidden email]>

> Chris,
>
>  I haven't tried load balancing with external Tomcat server but I think
> same will be work with trunk also.
>
>
> On Wed, Nov 11, 2009 at 2:04 PM, Christopher Snow <
> [hidden email]> wrote:
>
> > Hi Anil,
> >
> > Do Vignesh's instructions also work for trunk?  If not, is there any
> > documentation on how to do this in trunk?
> >
> > Many thanks,
> >
> > Chris
> >
> >
> >
> > Anil Soni wrote:
> >
> >> Vignesh, same thing can also be done on embedded Tomcat also, we've
> >> successfully implemented this on trunk.
> >>
> >>
> >> Thanks & Regards,
> >> Anil Soni
> >> [hidden email]
> >> Tel : 91-22-6795 4324
> >> Mobile : 9930302283
> >>
> >>
______________________________________________________________________

> >>
> >>
> >
> >
>
>
> --
> Anil Soni
> +91-9930302283cell
>



--

Best

Carsten Schinzer

Waisenhausstr. 53a
80637 München
Germany



______________________________________________________________________



______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz4.0 clustering,session replication, failover and load balancing - Howto

vignesh sabapathi
In reply to this post by Chris Snow-3
Hi Chris

I should work for trunk too .....


Chris Snow-3 wrote
Hi Anil,

Do Vignesh's instructions also work for trunk?  If not, is there any
documentation on how to do this in trunk?

Many thanks,

Chris


Anil Soni wrote:
> Vignesh, same thing can also be done on embedded Tomcat also, we've
> successfully implemented this on trunk.
>
>
> Thanks & Regards,
> Anil Soni
> Anil.Soni@lntinfotech.com
> Tel : 91-22-6795 4324
> Mobile : 9930302283
>
> ______________________________________________________________________
>  
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz4.0 clustering,session replication, failover and load balancing - Howto

c.schinzer
In reply to this post by Neha Mehta
Hi Neha,


2009/11/12 <[hidden email]>

> I have successfully load balanced OFBiz on Windows XP, but i am facing
> problem, when Apache http Server is on Linux machine.
> I feel there is problem with mod_jk.so connectivity. Could you please let
> me know, is mod_jk.so platform dependent?? Will the same mod.jk.so that i
> used for Windows work on Linux too??
>

Well, actually, the .so files are OS dependant binary libraries, so re your
last question: No.

Are you sure you copied over the very same workers.properties (the config
for mod_jk) ? Could you possibly post it here, along with a list of your
"backend" systems, i.e. ofbix instances so folks can review and assist?

Did you check connectivity from the Linux-based Apache Server using telnet
on AJP port?

Thanks & regards


Carsten
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz4.0 clustering,session replication, failover and load balancing - Howto

Neha Mehta
Hi Carsten,

Culd you please elaborate upon your statement,"Are you sure you copied
over the very same workers.properties (the config
for mod_jk) ? " ? I could not understand it well...

Here are my configuration files..
workers.properties

worker.worker2.port=8006
worker.worker2.host=172.17.88.196
worker.worker2.type=ajp13
worker.worker2.lbfactor=100
worker.worker2.redirect=worker1

worker.worker1.port=8009
worker.worker1.host=172.17.88.52
worker.worker1.type=ajp13
worker.worker1.lbfactor=1
worker.worker1.redirect=worker2

worker.list=worker1, worker2, loadbalancer
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=worker1, worker2


httpd.conf :

LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkShmFile     logs/mod_jk.shm
JkLogFile     logs/mod_jk.log
JkLogLevel    info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

httpd-vhosts.conf         ------- i have used virtual hosting for
switching of application between secured and non-secured ports.

<VirtualHost *:80>
ServerName 172.17.88.52:80
JkMount /* loadbalancer
JkMount /*/control/* loadbalancer
</VirtualHost>


On windows, everything is working great along with session replication.
If i have OFBiz code base on linux servers and APache Http Server on
windows, even then all works fine
But if i have APache http server on linux, it does not connect to OFBiz
server.
I am not able to find the problem . Please help me out, i am stuck up
here...


Thanks & Regards,
Neha Mehta


______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz4.0 clustering,session replication, failover and load balancing - Howto

c.schinzer
Well, the statement was trying to find whether the workers.properties on
windows and linux machine are the same.
Assuming this is the case:

Did you try connectivity to you OFBiz servers, i.e. what's the result of:
> telnet 172.17.88.196 8006
> telnet 172.17.88.52 8009
when executed from the Apache on Windows server and from the Apache on the
Linux box?

Can you also possibly check using a traceroute whether there is a firewall
inbetween your linux machine and your ofbiz instances?

Regards


Carsten


2009/11/12 <[hidden email]>

> Hi Carsten,
>
> Culd you please elaborate upon your statement,"Are you sure you copied
> over the very same workers.properties (the config
> for mod_jk) ? " ? I could not understand it well...
>
> Here are my configuration files..
> workers.properties
>
> worker.worker2.port=8006
> worker.worker2.host=172.17.88.196
> worker.worker2.type=ajp13
> worker.worker2.lbfactor=100
> worker.worker2.redirect=worker1
>
> worker.worker1.port=8009
> worker.worker1.host=172.17.88.52
> worker.worker1.type=ajp13
> worker.worker1.lbfactor=1
> worker.worker1.redirect=worker2
>
> worker.list=worker1, worker2, loadbalancer
> worker.loadbalancer.type=lb
> worker.loadbalancer.balanced_workers=worker1, worker2
>
>
> httpd.conf :
>
> LoadModule jk_module modules/mod_jk.so
> JkWorkersFile conf/workers.properties
> JkShmFile     logs/mod_jk.shm
> JkLogFile     logs/mod_jk.log
> JkLogLevel    info
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
>
> httpd-vhosts.conf         ------- i have used virtual hosting for
> switching of application between secured and non-secured ports.
>
> <VirtualHost *:80>
> ServerName 172.17.88.52:80
> JkMount /* loadbalancer
> JkMount /*/control/* loadbalancer
> </VirtualHost>
>
>
> On windows, everything is working great along with session replication.
> If i have OFBiz code base on linux servers and APache Http Server on
> windows, even then all works fine
> But if i have APache http server on linux, it does not connect to OFBiz
> server.
> I am not able to find the problem . Please help me out, i am stuck up
> here...
>
>
> Thanks & Regards,
> Neha Mehta
>
>
> ______________________________________________________________________




--

Best

Carsten Schinzer

Waisenhausstr. 53a
80637 München
Germany