You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ge...@gta-travel.com on 2007/09/10 18:38:35 UTC

Understanding jvmRoute usage

Hi
I am going through all of the potential settings I can set for mod_jk
and am not sure how the route property in mod_jk might be used.
 
I understand that this help to differentiate different servers in a load
balanced cluster to prevent sessions getting mixed up and to do session
stickyness.
 
If however this defaults to machine name this would only be used when
running two instances of tomcat on the same physical box. It then seems
to me that the only time you would really use jvmroute is when you have
multiple instances of tomcat running on the same box.
 
Does anyone know of other scenarios when this might be usefull or
imaginative ways of using this.
 
Regards

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

Re: Understanding jvmRoute usage

Posted by Peter Stavrinides <p....@albourne.com>.
We assign the name, for instance jvmRoute="LB1" where LB1 maps to a 
tomcat server in mod_proxy, if you want to switch between different 
versions of the same app you will have trouble with the context, unless 
each version is named differently.

Gerhardus.Geldenhuis@gta-travel.com wrote:
> Thanks,
> So do you assign a different jvmroute to each webapp?
>
> That would potentially be a better way to run multiple versions of the
> same app rather than running different Tomcats. That would be a nice way
> to switch quickly between different versions. Currently we have quite a
> painfull method for switching applications.
>
> Regards
>
>   
>> -----Original Message-----
>> From: Peter Stavrinides [mailto:p.stavrinides@albourne.com] 
>> Sent: 12 September 2007 10:41
>> To: Tomcat Users List
>> Subject: Re: Understanding jvmRoute usage
>>
>> I use this parameter because I needed to integrate multiple 
>> web apps on the same backend server using mod_proxy and 
>> mod_rewrite into the same namespace(of the apache front end). 
>> We point to the server and configure a sticky session so we 
>> don't have to run everything in the root context, magic !!
>>
>>     
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email 
> ______________________________________________________________________
>
> ---------------------------------------------------------------------
> 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
>
>   


---------------------------------------------------------------------
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


RE: Understanding jvmRoute usage

Posted by Ge...@gta-travel.com.
Thanks,
So do you assign a different jvmroute to each webapp?

That would potentially be a better way to run multiple versions of the
same app rather than running different Tomcats. That would be a nice way
to switch quickly between different versions. Currently we have quite a
painfull method for switching applications.

Regards

> -----Original Message-----
> From: Peter Stavrinides [mailto:p.stavrinides@albourne.com] 
> Sent: 12 September 2007 10:41
> To: Tomcat Users List
> Subject: Re: Understanding jvmRoute usage
> 
> I use this parameter because I needed to integrate multiple 
> web apps on the same backend server using mod_proxy and 
> mod_rewrite into the same namespace(of the apache front end). 
> We point to the server and configure a sticky session so we 
> don't have to run everything in the root context, magic !!
> 

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

---------------------------------------------------------------------
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


Re: Understanding jvmRoute usage

Posted by Peter Stavrinides <p....@albourne.com>.
I use this parameter because I needed to integrate multiple web apps on 
the same backend server using mod_proxy and mod_rewrite into the same 
namespace(of the apache front end). We point to the server and configure 
a sticky session so we don't have to run everything in the root context, 
magic !!

Rainer Jung wrote:
> Gerhardus.Geldenhuis@gta-travel.com wrote:
>> Hi
>> I am going through all of the potential settings I can set for mod_jk
>> and am not sure how the route property in mod_jk might be used.
>>  
>> I understand that this help to differentiate different servers in a load
>> balanced cluster to prevent sessions getting mixed up and to do session
>> stickyness.
>>  
>> If however this defaults to machine name this would only be used when
>> running two instances of tomcat on the same physical box. It then seems
>> to me that the only time you would really use jvmroute is when you have
>> multiple instances of tomcat running on the same box.
>>  
>> Does anyone know of other scenarios when this might be usefull or
>> imaginative ways of using this.
>>  
>> Regards
>
> The load balancer docs 
> http://tomcat.apache.org/connectors-doc/generic_howto/loadbalancers.html 
> tell us:
>
> ===
>
> If you want to use session stickyness, you must set different jvmRoute 
> attributes in the Engine element in Tomcat's server.xml. Furthermore 
> the names of the workers which are managed by the balancer have to be 
> equal to the jvmRoute of the Tomcat instance they connect with.
>
> ===
>
> The workers properties documentation gives us information about the 
> alternative attribute "route":
>
> ===
>
> Normally the name of a balanced worker in a load balancer is equal to 
> the jvmRoute of the corresponding Tomcat instance. If you want to 
> include a worker corresponding to a Tomcat instance into several load 
> balancers with different balancing configuration (e.g. disabled, 
> stopped) you can use this attribute.
>
> Define a seperate worker per lb and per Tomcat instance with an 
> arbitrary worker name and set the route attribute of the worker equal 
> to the jvmRoute of the target Tomcat instance.
>
> If this attribute is left empty, the name of the worker will be used.
>
> This attribute can be changed at runtime using status worker.
>
> ===
>
> Regards,
>
> Rainer
>
> ---------------------------------------------------------------------
> 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
>


---------------------------------------------------------------------
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


Re: Understanding jvmRoute usage

Posted by Rainer Jung <ra...@kippdata.de>.
Gerhardus.Geldenhuis@gta-travel.com wrote:
> Hi
> I am going through all of the potential settings I can set for mod_jk
> and am not sure how the route property in mod_jk might be used.
>  
> I understand that this help to differentiate different servers in a load
> balanced cluster to prevent sessions getting mixed up and to do session
> stickyness.
>  
> If however this defaults to machine name this would only be used when
> running two instances of tomcat on the same physical box. It then seems
> to me that the only time you would really use jvmroute is when you have
> multiple instances of tomcat running on the same box.
>  
> Does anyone know of other scenarios when this might be usefull or
> imaginative ways of using this.
>  
> Regards

The load balancer docs 
http://tomcat.apache.org/connectors-doc/generic_howto/loadbalancers.html 
tell us:

===

If you want to use session stickyness, you must set different jvmRoute 
attributes in the Engine element in Tomcat's server.xml. Furthermore the 
names of the workers which are managed by the balancer have to be equal 
to the jvmRoute of the Tomcat instance they connect with.

===

The workers properties documentation gives us information about the 
alternative attribute "route":

===

Normally the name of a balanced worker in a load balancer is equal to 
the jvmRoute of the corresponding Tomcat instance. If you want to 
include a worker corresponding to a Tomcat instance into several load 
balancers with different balancing configuration (e.g. disabled, 
stopped) you can use this attribute.

Define a seperate worker per lb and per Tomcat instance with an 
arbitrary worker name and set the route attribute of the worker equal to 
the jvmRoute of the target Tomcat instance.

If this attribute is left empty, the name of the worker will be used.

This attribute can be changed at runtime using status worker.

===

Regards,

Rainer

---------------------------------------------------------------------
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