geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ludovic Maitre <>
Subject Re: Clustering and Tomcat 5.5.12
Date Mon, 14 Nov 2005 18:07:15 GMT
Hi Jeff and all,

I will do the second guinea pig, i would like to run 3 tomcat instances 
inside geronimo. The purpose is to be able to upgrade apps on my website 
without downtime. I was wondering if i can derivate some GBeans to 
implements some "farming" on my cluster (deploy the webapps on each node 
as i understand it -- but i just began to transpose the concepts i know 
from weblogic to geronimo).

I don't understand yet why multiples IPs are required but sure i will 
see the problem when i will implement this setup, (actually this *seems* 
to run fine with apache2 as load balancer and my 3 tomcat instances 
listenning to differents ports),
Many thanks for having committed the GBeans i will check out them now,
Best regards,

Jeff Genender wrote:

> Dave Colasurdo wrote:
>> I'm interested in testing and helping to document geronimo Tomcat 
>> clustering.  As a first step, I've setup a Tomcat cluster independent 
>> of Geronimo.  Once I get this fully working, I plan to reuse the 
>> configuration info in the geronimo environment.
> Thank you for taking the initiative on this.  You will be our main 
> test on this since it has been limited for me due to my time constraints.
>> I've managed to setup the Apache http server and mod_jk as the load 
>> balancer and do see the requests get sprayed to different tomcat 
>> servers (on two diferent machines).  Sticky port is enabled and I see 
>> the node id in the cookie and the rewritten url..
>> Initially, I tried using memory replication.  Cluster membership 
>> between the nodes isn't working.  I believe this is due to the fact 
>> that both machines are using DHCP and that their IP addresses aren't 
>> on the same subnet.  I can always use two Tomcat installs on the same 
>> machine though was hoping to setup a more realistic scenario using 
>> multiple machines. I guess I need to setup a shared file system or 
>> use a database.
>> Any advice?
> Yep...(relative to geronimo) if you want to run it on the same 
> have some hacking to do on the plans.  You should be 
> able to alias your IP address to support multiple IPs.  Then in the 
> Tomcat plan, you need the connectors of each instance to listen on one 
> of the IP addresses (of course each instance should be listening on a 
> different IP address).  For stand alone tomcat, this would be a 
> similar process...the connectors need to listen on their own addresses.
> IMHO, I would test this on multiple machines before a single machine 
> with a single instance since you will probably run into other problems 
> as well with other services in Geronimo.  After you get a 
> multi-machine cluster working, then we  can configure it for a single 
> machine.
> Also, The engine GBean needs to use the jvmRoute initparam and you 
> should make separate names for each instance (i.e. node1, node2, etc).
>> Assuming this works out.. A few question concerning running 
>> clustering within Geronimo.
>> For tomcat, I update server.xml to configure AJP Connector, Cluster 
>> config, Engine jvmRoute, etc.. How will we configure silmilar type
>> information in Geronimo?
> It follows the same paradigm as the other Tomcat GBeans.  You can set 
> up a cluster at the Engine, Host, or Context level.  The Valves and 
> Realms are a great example of this.  For the host and engine 
> clustering you will do it in the j2ee-tomcat-plan.xml.  For context 
> you will do it in a geronimo-web.xml or web descriptor plan.
> I will write up an example and email it to the lists and then you can 
> give it a try.
>> Do the distributable applications need to create deployment plans 
>> that reference the new GBeans?
> Depends whether you only want to cluster at a Context level or a host 
> level.
>> Any additional steps?
> Yep...stay tuned...I'll write something up.  Thank you very much for 
> being the guinea p^H^H^H^H^H^H^H^H test person on this ;-)
>> Thanks
>> -Dave-
>> Jeff Genender wrote:
>>> I have checked in some initial Clustering GBeans for Tomcat.  As I 
>>> developed this, it appeared that the Tomcat version 5.5.9 did not 
>>> match the Tomcat doc.  This led me to examine the Tomcat objects and 
>>> changelog.  It would appear that there were some improvements 
>>> between TC v 5.5.9 and 5.5.12, especially with regard to 
>>> Clustering.  so due to this, I have upgraded our version of Tomcat 
>>> to 5.5.12.
>>> I have tested this with some of our applications (i.e. console) and 
>>> the unit tests.  All looks good to me... so far ;-)
>>> If there are any issues, let me know.
>>> Jeff

Ludo -
"L'amour pour principe et l'ordre pour base; le progres pour but" (A.Comte) 

View raw message