geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Santosh Koti" <Santosh_K...@infosys.com>
Subject RE: Clustering help..!
Date Wed, 26 Apr 2006 19:00:19 GMT

Dave, 

Here is my understanding:

 "Even in the sticky session, session replication happens whenever there
is change in session data by the client, the re-routing happens only on
failure of the cluster member..!"  - Am I right...?

PS: Earlier, I thought, in sticky session replication will not happen.,
it is altogether a new episode....! , thanks for clearing it..!


Thanks,
Santosh.
"Don't talk about yourself; it will be done when you leave. "
 

-----Original Message-----
From: Dave Colasurdo [mailto:davecola@earthlink.net] 
Sent: Thursday, April 27, 2006 12:13 AM
To: user@geronimo.apache.org
Subject: Re: Clustering help..!

Santosh Koti wrote:
> Dave,
> 
> One more question as u said: 
> "Requests will be rerouted to a different cluster member only when the

> original cluster member fails or is unreachable." - If the failure
> occurs , will it result in session state replication on to the other
> member, or it is a new stuff altogether...??? !!
>
The cluster member that owns the session will replicate session state 
(for that session) with all other cluster members anytime the session 
data is updated from the client.
So, when a cluster member fails, the session state is already available 
on the new cluster member..

The idea is that the end user (web browser) will continue to work (with 
the same contents in their "shopping cart") without ever knowing that a 
server failed.

> 
> Thanks,
> Santosh.
> "Don't talk about yourself; it will be done when you leave. "
>  
> 
> 
> 
> -----Original Message-----
> From: Dave Colasurdo [mailto:davecola@earthlink.net] 
> Sent: Wednesday, April 26, 2006 11:17 PM
> To: user@geronimo.apache.org
> Subject: Re: Clustering help..!
> 
> Comments below..
> 
> Santosh Koti wrote:
>> Hernan,
>>
>>  
>>
>> I got it working finally , both with the sticky session=0,1 , in 
>> non-sticky session , some time it fails...!
>>
>>  
>>
>> Any idea..?
>>
>>
> I'd recommend always running with sticky session enabled.  This means 
> that all requests from a particular client (e.g. browser)will be
routed 
> to the same cluster member if session data is used.  This is the
safest 
> and most efficient way to assure that session state is maintained
across
> 
> http requests.
> 
> Requests will be rerouted to a different cluster member only when the 
> original cluster member fails or is unreachable.
> 
>> (I have given my config details after my questions,ie, below..!)
>>
>>  
>>
>> *Some questions:*
>>
>>  
>>
>> *a) Note: Once I build my EAR file , I deploy it on both the
machines,
> 
>> so the Geronimo-web.xml is the same on both machines, I guess it has
> to 
>> be different w.r.t 'mcastBindAddress' - value for different
> instances..! *
> 
> Yes, there are two spots in the deployment plan that needs to be
updated
> 
> with the IP address for the specific server.
> 
>> * *
>>
>> * *
>>
>> *b) One more question I need to ask is : gbean name="FarmWarDeployer"
> , 
>> needs to be specified in the deployment plan , or is it optional...?*
>>
> IIRC, FarmWarDeployer is commented out in the deployment plan as it
was 
> never tested.  It was suspected that there may be additional changes
to 
> geronimo to fully support farming.
> 
> 
>> * *
>>
>> * *
>>
>> *c) By the way , what is farming , is it used for deploying **ur** 
>> application on to the cluster members, if so , will it change the 
>> deployment plan at run time..?*
>>
>>  
> Farming provides hot deployment of an application across a cluster.
> Basically, an application (war) is deployed on one cluster member and
is
> 
> automatically deployed to all of the other members in the cluster.
> 
>> *(correct me if I am wrong..!)*
>>
>>  
>>
>>  
>>
>> As asked, here are my details (that I added to the existing stuff):
>>
>>  
>>
>> -------------Part of Httpd.conf file ------
>>
>>  
>>
>> LoadModule jk_module modules\mod_jk.so
>>
>> JkWorkersFile C:\Apache-HTTP\Apache2\conf\workers.properties
>>
>> JkLogFile     C:\Apache-HTTP\Apache2\logs\mod_jk.log
>>
>> #JkLogLevel    info
>>
>>  
>>
>> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
>>
>> JkAutoAlias C:\Apache-HTTP\Apache2\config-store
>>
>> #JkMount /console/* ajp13
>>
>> #JkMount /setl/* ajp13
>>
>> JkMount /setl* loadbalancer
>>
>>  
>>
>> -------------End of Httpd.conf file ------
>>
>>  
>>
>> --------------workers.properties----------------
>>
>> worker.list=loadbalancer,status,node1,node2
>>
>> worker.node1.port=8009
>>
>> worker.node1.host=localhost
>>
>> worker.node1.type=ajp13
>>
>> worker.node1.lbfactor=100
>>
>>  
>>
>> worker.node2.port=8009
>>
>> worker.node2.host=172.25.203.139
>>
>> worker.node2.type=ajp13
>>
>> worker.node2.lbfactor=100
>>
>>  
>>
>> worker.loadbalancer.type=lb
>>
>> worker.loadbalancer.balance_workers=node1,node2
>>
>> #worker.loadbalancer.sticky_session=0
>>
>> worker.loadbalancer.sticky_session=1
>>
>>  
>>
>>  
>>
>> worker.status.type=status
>>
>> /setl=loadbalancer
>>
>> /setl/*=loadbalancer
>>
>>  
>>
>>  
>>
>> --------------end of workers.properties----------------
>>
>>  
>>
>>  
>>
>> -----------------geronimo-web.xml----------------
>>
>>  
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <web-app
>>
>>     xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.0"
>>
>>     xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0"   
>>
>>     configId="MyConfigName"
>>
>>     parentId="SBank/Entities"
>>
>>   >
>>
>>  
>>
>>   <container-config>
>>
>>         <tomcat 
>> xmlns="http://geronimo.apache.org/xml/ns/web/tomcat/config-1.0">
>>
>>             <cluster>TomcatCluster</cluster>
>>
>>            
>>
>>            
>>
>>                 <gbean name="TomcatCluster" 
>> class="org.apache.geronimo.tomcat.cluster.CatalinaClusterGBean">
>>
>>                   <attribute 
>>
>
name="className">org.apache.catalina.cluster.tcp.SimpleTcpCluster</attri
> bute>
>>                   <attribute name="initParams">
>>
>>                       
>> managerClassName=org.apache.catalina.cluster.session.DeltaManager
>>
>>                       expireSessionsOnShutdown=false
>>
>>                       useDirtyFlag=false
>>
>>                       notifyListenersOnReplication=true
>>
>>                   </attribute>
>>
>>          
>>
>>                   <reference name="Membership"> 
>> <moduleType>J2EEModule</moduleType> <name>TomcatMembership</name>

>> </reference>
>>
>>                   <reference name="Receiver"> 
>> <moduleType>J2EEModule</moduleType> <name>TomcatReceiver</name>

>> </reference>
>>
>>                   <reference name="Sender"> 
>> <moduleType>J2EEModule</moduleType> <name>TomcatSender</name>
> </reference>
>>                   <reference name="TomcatValveChain"> 
>> <moduleType>J2EEModule</moduleType> <name>ReplicationValve</name>

>> </reference>
>>
>>                   <!--
>>
>>                   <reference name="ClusterDeployer"> 
>> <moduleType>J2EEModule</moduleType> <name>FarmWarDeployer</name>

>> </reference>
>>
>>                   -->
>>
>>                     </gbean>
>>
>>                    
>>
>>                     <gbean name="TomcatMembership" 
>> class="org.apache.geronimo.tomcat.cluster.MembershipServiceGBean">
>>
>>                         <attribute 
>>
>
name="className">org.apache.catalina.cluster.mcast.McastService</attribu
> te>
>>                         <attribute name="initParams">
>>
>>                             mcastAddr=228.0.0.4
>>
>>                             mcastBindAddress= 172.21.34.97
>>
>>                             mcastPort=45564
>>
>>                             mcastFrequency=500
>>
>>                             mcastDropTime=3000
>>
>>                         </attribute>
>>
>>                    </gbean>
>>
>>                   
>>
>>                   
>>
>>                        <!-- Receiver -->
>>
>>               
>>
>>                    <gbean name="TomcatReceiver"
>>
>>                        
>> class="org.apache.geronimo.tomcat.cluster.ReceiverGBean">
>>
>>                        <attribute 
>>
>
name="className">org.apache.catalina.cluster.tcp.ReplicationListener</at
> tribute>
>>                        <attribute name="initParams">
>>
>>                            tcpListenAddress= 172.21.34.97
>>
>>                            tcpListenPort=4001
>>
>>                            tcpSelectorTimeout=100
>>
>>                            tcpThreadCount=6
>>
>>                        </attribute>
>>
>>                    </gbean> 
>>
>>               
>>
>>                    <!-- Sender -->
>>
>>               
>>
>>                    <gbean name="TomcatSender"
>>
>>                        
>> class="org.apache.geronimo.tomcat.cluster.SenderGBean">
>>
>>                        <attribute 
>>
>
name="className">org.apache.catalina.cluster.tcp.ReplicationTransmitter<
> /attribute>
>>                        <attribute name="initParams">
>>
>>                            replicationMode=pooled
>>
>>                            ackTimeout=15000
>>
>>                        </attribute>
>>
>>                         </gbean>  
>>
>>                        
>>
>>                        
>>
>>                     <!-- Valves -->
>>
>>                  <gbean name="ReplicationValve"
>>
>>                    class="org.apache.geronimo.tomcat.ValveGBean">
>>
>>                    <attribute 
>>
>
name="className">org.apache.catalina.cluster.tcp.ReplicationValve</attri
> bute>
>>                    <attribute name="initParams">
>>
>>                    
>>
>
filter=.*\.gif;.*\.js;.*\.css;.*\.png;.*\.jpeg;.*\.jpg;.*\.htm;.*\.html;
> .*\.txt;
>>                    </attribute>
>>
>>                  </gbean>   
>>
>>     
>>
>>            
>>
>>         </tomcat>
>>
>>   </container-config>
>>
>>    
>>
>> </web-app>
>>
>>  
>>
>> ----------------------end of Geronimo-web.xml---------------------
>>
>>  
>>
>>  
>>
>>  
>>
>> Thanks for ur time & effort..!
>>
>>  
>>
>>  
>>
>> Smiles,
>>
>> Santosh.
>>
>> "Don't talk about yourself; it will be done when you leave. "
>>
>>  
>>
>>  
>>
>> -----Original Message-----
>> From: Hernan Cunico [mailto:hcunico@gmail.com]
>> Sent: Wednesday, April 26, 2006 9:28 PM
>> To: user@geronimo.apache.org
>> Subject: Re: Clustering help..!
>>
>>  
>>
>> Hi Santosh,
>>
>> can you provide more details (what, how, when)
>>
>>  
>>
>> Can you forward a request from one HTTP to one Geronimo?
>>
>>  
>>
>> Cheers!
>>
>> Hernan
>>
>>  
>>
>> Santosh Koti wrote:
>>
>>>  Hi Guys,
>>>  While doing clustering ,
>>>  I have the following setup:
>>>   Machine1: Geronimo1
>>>  Machine2: Geronimo2
>>>  Machine3: Apache 1
>>>  Machine4: Apache2
>>>  I had made the config, but my apache setup is fine , but I think ,
> it is
>>>  not able to connect to my expected clustered machines..!
>>>  What is that , I am missing..?
>>>  Thanks,
>>>  Santosh.
>>>  "Don't talk about yourself; it will be done when you leave. "
>>>  **************** CAUTION - Disclaimer *****************
>>>  This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION
> intended
>>>  solely for the use of the addressee(s). If you are not the intended
>>>  recipient, please notify the sender by e-mail and delete the
> original
>>>  message. Further, you are not to copy, disclose, or distribute this
>>>  e-mail or its contents to any other person and any such actions are
>>>  unlawful. This e-mail may contain viruses. Infosys has taken every
>>>  reasonable precaution to minimize this risk, but is not liable for
> any
>>>  damage you may sustain as a result of any virus in this e-mail. You
>>>  should carry out your own virus checks before opening the e-mail or
>>>  attachment. Infosys reserves the right to monitor and review the
> content
>>>  of all messages sent to or from this e-mail address. Messages sent
> to or
>>>  from this e-mail address may be stored on the Infosys e-mail
system.
>>>  ***INFOSYS******** End of Disclaimer ********INFOSYS***
> 
> 

Mime
View raw message