tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clifford Bryant" <CBry...@edgewater.com>
Subject RE: Clustering Tomcat with multiple machines
Date Thu, 08 Nov 2007 17:59:48 GMT
No, just once.  The multicast address is a broadcast address.  It is a
single address.  All servers on the network will listen for it.  You put
the <distributable/> tag in the web.xml of the applications that want to
be clustered.

1. You will need to open the multicast port 45564 for UDP, and the TCP
listen port 4001 for TCP.
2. The network interfaces should be enabled for multicast.
	ifconfig eth0 multicast
3. Create a multicast route for each network interface.
	route add -host 239.255.0.1 dev eth0
(Run these commands as root.)

You can check if multicast is working with,
	ping 239.255.0.1
You should get multiple responses back.

Here is the <Cluster> tag that I am using.  It is slightly modified from
the one on the CAS clustering web page.  (I changed the mcastTTL.)
There is also already a <Cluster> tag in the Tomcat server.xml that you
can uncomment.  You can try either one.    

    
        <Cluster
className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
 
managerClassName="org.apache.catalina.cluster.session.DeltaManager"
                 expireSessionsOnShutdown="false"
                 useDirtyFlag="true">

            <Membership
 
className="org.apache.catalina.cluster.mcast.McastService"
                mcastAddr="239.255.0.1"
                mcastPort="45564"
                mcastFrequency="500"
                mcastDropTime="3000"
                mcastTTL="250"/>

            <Receiver
 
className="org.apache.catalina.cluster.tcp.ReplicationListener"
                tcpListenAddress="10.10.10.96"
                tcpListenPort="4001"
                tcpSelectorTimeout="100"
                tcpThreadCount="6"/>

            <Sender
 
className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
                replicationMode="pooled"/>

            <Valve
className="org.apache.catalina.cluster.tcp.ReplicationValve"
 
filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;" />

            <ClusterListener
className="org.apache.catalina.cluster.session.ClusterSessionListener"/>

        </Cluster>



-----Original Message-----
From: Steven Crosley [mailto:stevencrosley@mac.com] 
Sent: Thursday, November 08, 2007 12:16 PM
To: Tomcat Users List
Subject: Re: Clustering Tomcat with multiple machines

Thanks Clifford,

So if I'm setting up 3 servers, each tomcat instance needs to have  
this element twice?  Is the mcastAddr, the IP for the other machines?

<Membership
className="org.apache.catalina.cluster.mcast.McastService"
mcastAddr="228.0.0.4"
mcastBindAddress="127.0.0.1"
mcastClusterDomain="d10"
mcastPort="45564"
mcastFrequency="1000"
mcastDropTime="30000"
recoveryCounter="10"
recoveryEnabled="true"
recoverySleepTime="5000"/>
Thanks,
Steven

On Nov 8, 2007, at 11:04 AM, Clifford Bryant wrote:

> Here are some links that I used to cluster 2 machines.
>
> http://www.ja-sig.org/wiki/display/CASUM/Clustering+CAS
> http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html
>
> Basically, you need to set up multicast on your network, so that the
> machines can share session information.
>
> -----Original Message-----
> From: Steven Crosley [mailto:stevencrosley@mac.com]
> Sent: Thursday, November 08, 2007 12:00 PM
> To: users@tomcat.apache.org
> Subject: Clustering Tomcat with multiple machines
>
> Hi,
>
> I've been scouring the web for documentation regarding clustering
> Tomcat on 3 machines.  The only documentation I can find contains
> information about clustering 3 instances of Tomcat on the same  
> machine.
>
> Can anyone tell me what exactly would need to be changed in order to
> use Tomcat on 3 machines instead of 3 instances on 1 machine?
>
> Thanks,
> Steven
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
> This e-mail and any files transmitted with it are confidential and  
> are intended solely for the use of the individual or entity to whom  
> they are addressed.  This communication may contain information that  
> is protected from disclosure by applicable law.  If you are not the  
> intended recipient, or the employee or agent responsible for  
> delivering this communication to the intended recipient, be advised  
> that you have received this e-mail in error and any use,  
> dissemination, forwarding, printing or copying of this e-mail is  
> strictly prohibited.  If you believe that you have received this e- 
> mail in error, please immediately notify Edgewater Technology by  
> telephone at (781) 246-3343 and delete the communication from all e- 
> mail files.
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>



This e-mail and any files transmitted with it are confidential and are intended solely for
the use of the individual or entity to whom they are addressed.  This communication may contain
information that is protected from disclosure by applicable law.  If you are not the intended
recipient, or the employee or agent responsible for delivering this communication to the intended
recipient, be advised that you have received this e-mail in error and any use, dissemination,
forwarding, printing or copying of this e-mail is strictly prohibited.  If you believe that
you have received this e-mail in error, please immediately notify Edgewater Technology by
telephone at (781) 246-3343 and delete the communication from all e-mail files.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message