You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mark Gastel <mg...@abebooks.com> on 2003/08/12 01:03:27 UTC

Hardware loadbalancing with JK2

Hi,

I am trying to get hardware load balancing to work between apache
2.0.46/mod_jk2, a cisco css and tomcat 4.1.27.  The way this works is an
ajp13 service has been created on the css.  Apache talks to this css ajp
service which is split among several tomcat instances...  Now the problem:
Because mod_jk2 seems to have some form of connection caching going,  when I
disable a tomcat instance it still receives ajp13 connections.  Is there a
way to disable the connection caching in JK2 and forcing it to establish a
new connection with every hit?  I know this would give a performance hit,
but it will give me fine grain control over how traffic is distributed.

If you could attach a piece of a workers2.properties file I would really
appreciate it!!
Thanks
Mark

Re: Where to put js scripts on tomcat server...

Posted by Don Reese <dr...@tampabay.rr.com>.
Hi Jacob,

With your confirmation as to where the files should be, I was
able to track down the issue and it is now resolved.  Case
sensitivity was the issue - fixed that and now all is well.

Don Reese

----- Original Message ----- 
From: "Jacob Kjome" <ho...@visi.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Monday, August 11, 2003 9:35 PM
Subject: Re: Where to put js scripts on tomcat server...


>
> It will be relative to the directory you see in your browser.  For
> instance, if you have this...
>
> http://localhost:8080/mycontext/mypage.jsp
>
> The .jsp file below would be loaded from the root of /mycontext just like
> mypage.jsp is.  The URL to it would be...
>
> http://localhost:8080/mycontext/filename.js
>
> Keep in mind that the <script> source path has nothing to do with servlet
> mappings and such.  It is resolved by the browser.  This means it
> definitely cannot be under WEB-INF since that is not directly accessible
> via a browser.  It is a server-side concept so only server-side code has
> access to it.  Here is where it would physically exist in your webapp...
>
> /webapps/mycontext/filename.js
>
>
> Jake
>
> At 08:48 PM 8/11/2003 -0400, you wrote:
> >Greetings,
> >
> >I assume this has been asked before, but I can't seem to track it down in
> >the archives
> >or any other document I have found.
> >
> >I am having trouble inserting a
> >
> ><script type="text/javascript" language="javascript"
> >src="filename.js"></script>
> >
> >into my HTML output and the browser being able to find the JS file.
> >
> >I have tried putting the js files into various directories but have not
been
> >successful in find the correct place.
> >
> >I have tried putting them in the following locations:
> >
> >webapps/*
> >webapps/myservlet/*
> >webapps/myservlet/WEB-INF
> >webapps/ROOT
> >webapps/ROOT/WEB-INF
> >
> >but none of these fix the problem of the missing JS file in the brower.
> >
> >Any pointers on what I may be doing wrong (I assume that Tomcat can
> >serve up the JS files just as it can my Image files).
> >
> >Thanks in advance,
> >
> >Don Reese
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Where to put js scripts on tomcat server...

Posted by Don Reese <dr...@tampabay.rr.com>.
Hi Jacob,

With your confirmation as to where the files should be, I was
able to track down the issue and it is now resolved.  Case
sensitivity was the issue - fixed that and now all is well.

Don Reese

----- Original Message ----- 
From: "Jacob Kjome" <ho...@visi.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Monday, August 11, 2003 9:35 PM
Subject: Re: Where to put js scripts on tomcat server...


>
> It will be relative to the directory you see in your browser.  For
> instance, if you have this...
>
> http://localhost:8080/mycontext/mypage.jsp
>
> The .jsp file below would be loaded from the root of /mycontext just like
> mypage.jsp is.  The URL to it would be...
>
> http://localhost:8080/mycontext/filename.js
>
> Keep in mind that the <script> source path has nothing to do with servlet
> mappings and such.  It is resolved by the browser.  This means it
> definitely cannot be under WEB-INF since that is not directly accessible
> via a browser.  It is a server-side concept so only server-side code has
> access to it.  Here is where it would physically exist in your webapp...
>
> /webapps/mycontext/filename.js
>
>
> Jake
>
> At 08:48 PM 8/11/2003 -0400, you wrote:
> >Greetings,
> >
> >I assume this has been asked before, but I can't seem to track it down in
> >the archives
> >or any other document I have found.
> >
> >I am having trouble inserting a
> >
> ><script type="text/javascript" language="javascript"
> >src="filename.js"></script>
> >
> >into my HTML output and the browser being able to find the JS file.
> >
> >I have tried putting the js files into various directories but have not
been
> >successful in find the correct place.
> >
> >I have tried putting them in the following locations:
> >
> >webapps/*
> >webapps/myservlet/*
> >webapps/myservlet/WEB-INF
> >webapps/ROOT
> >webapps/ROOT/WEB-INF
> >
> >but none of these fix the problem of the missing JS file in the brower.
> >
> >Any pointers on what I may be doing wrong (I assume that Tomcat can
> >serve up the JS files just as it can my Image files).
> >
> >Thanks in advance,
> >
> >Don Reese
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>



Re: Where to put js scripts on tomcat server...

Posted by Jacob Kjome <ho...@visi.com>.
It will be relative to the directory you see in your browser.  For 
instance, if you have this...

http://localhost:8080/mycontext/mypage.jsp

The .jsp file below would be loaded from the root of /mycontext just like 
mypage.jsp is.  The URL to it would be...

http://localhost:8080/mycontext/filename.js

Keep in mind that the <script> source path has nothing to do with servlet 
mappings and such.  It is resolved by the browser.  This means it 
definitely cannot be under WEB-INF since that is not directly accessible 
via a browser.  It is a server-side concept so only server-side code has 
access to it.  Here is where it would physically exist in your webapp...

/webapps/mycontext/filename.js


Jake

At 08:48 PM 8/11/2003 -0400, you wrote:
>Greetings,
>
>I assume this has been asked before, but I can't seem to track it down in
>the archives
>or any other document I have found.
>
>I am having trouble inserting a
>
><script type="text/javascript" language="javascript"
>src="filename.js"></script>
>
>into my HTML output and the browser being able to find the JS file.
>
>I have tried putting the js files into various directories but have not been
>successful in find the correct place.
>
>I have tried putting them in the following locations:
>
>webapps/*
>webapps/myservlet/*
>webapps/myservlet/WEB-INF
>webapps/ROOT
>webapps/ROOT/WEB-INF
>
>but none of these fix the problem of the missing JS file in the brower.
>
>Any pointers on what I may be doing wrong (I assume that Tomcat can
>serve up the JS files just as it can my Image files).
>
>Thanks in advance,
>
>Don Reese
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Where to put js scripts on tomcat server...

Posted by Jacob Kjome <ho...@visi.com>.
It will be relative to the directory you see in your browser.  For 
instance, if you have this...

http://localhost:8080/mycontext/mypage.jsp

The .jsp file below would be loaded from the root of /mycontext just like 
mypage.jsp is.  The URL to it would be...

http://localhost:8080/mycontext/filename.js

Keep in mind that the <script> source path has nothing to do with servlet 
mappings and such.  It is resolved by the browser.  This means it 
definitely cannot be under WEB-INF since that is not directly accessible 
via a browser.  It is a server-side concept so only server-side code has 
access to it.  Here is where it would physically exist in your webapp...

/webapps/mycontext/filename.js


Jake

At 08:48 PM 8/11/2003 -0400, you wrote:
>Greetings,
>
>I assume this has been asked before, but I can't seem to track it down in
>the archives
>or any other document I have found.
>
>I am having trouble inserting a
>
><script type="text/javascript" language="javascript"
>src="filename.js"></script>
>
>into my HTML output and the browser being able to find the JS file.
>
>I have tried putting the js files into various directories but have not been
>successful in find the correct place.
>
>I have tried putting them in the following locations:
>
>webapps/*
>webapps/myservlet/*
>webapps/myservlet/WEB-INF
>webapps/ROOT
>webapps/ROOT/WEB-INF
>
>but none of these fix the problem of the missing JS file in the brower.
>
>Any pointers on what I may be doing wrong (I assume that Tomcat can
>serve up the JS files just as it can my Image files).
>
>Thanks in advance,
>
>Don Reese
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Where to put js scripts on tomcat server...

Posted by Don Reese <dr...@tampabay.rr.com>.
Greetings,

I assume this has been asked before, but I can't seem to track it down in
the archives
or any other document I have found.

I am having trouble inserting a

<script type="text/javascript" language="javascript"
src="filename.js"></script>

into my HTML output and the browser being able to find the JS file.

I have tried putting the js files into various directories but have not been
successful in find the correct place.

I have tried putting them in the following locations:

webapps/*
webapps/myservlet/*
webapps/myservlet/WEB-INF
webapps/ROOT
webapps/ROOT/WEB-INF

but none of these fix the problem of the missing JS file in the brower.

Any pointers on what I may be doing wrong (I assume that Tomcat can
serve up the JS files just as it can my Image files).

Thanks in advance,

Don Reese



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Where to put js scripts on tomcat server...

Posted by Don Reese <dr...@tampabay.rr.com>.
Greetings,

I assume this has been asked before, but I can't seem to track it down in
the archives
or any other document I have found.

I am having trouble inserting a

<script type="text/javascript" language="javascript"
src="filename.js"></script>

into my HTML output and the browser being able to find the JS file.

I have tried putting the js files into various directories but have not been
successful in find the correct place.

I have tried putting them in the following locations:

webapps/*
webapps/myservlet/*
webapps/myservlet/WEB-INF
webapps/ROOT
webapps/ROOT/WEB-INF

but none of these fix the problem of the missing JS file in the brower.

Any pointers on what I may be doing wrong (I assume that Tomcat can
serve up the JS files just as it can my Image files).

Thanks in advance,

Don Reese



RE: Hardware loadbalancing with JK2

Posted by Mark Gastel <mg...@abebooks.com>.
Hi Eric,

Thanks!  The connectionTimeout did the trick.  I was so focused on the jk2
side I didn't think about that tomcat might be holding the connection open.
M


-----Original Message-----
From: Eric J. Pinnell [mailto:eric@iCky.org]
Sent: Tuesday, August 12, 2003 4:02 AM
To: Tomcat Users List
Subject: RE: Hardware loadbalancing with JK2


Make sure you have a connectionTimout defined in your server.xml for the
coyote connector.  By default it's 0 (which I gather to be infinite).

Setting it to 60000 or 120000 will make the connection timeout.  I am
unsure about the cache thing you are talking about because I just use the
normal JK2 loadbalancing but it seems that if you make the connections
timeout it won't send a keepalive.

-e

On Mon, 11 Aug 2003, Mark Gastel wrote:

> Hi Eric,
>
> Thanks.  At this point I'm a bit more comfortable using a hardware
> loadbalancer over the jk2 stuff.  we've been using a css in production for
> well over a year.  Unlike tomcat or apache I've seen very little movement
in
> the jk2 code base and the documentation is very confusing at times.
>
> My problem is not the basic configuration ...I have a working setup.  My
> problem is because mod_jk2 is using a connection cache (keepalive
> connections or something) it is sending requests to a service that has
been
> disabled.  This really sucks if you want to upgrade a tomcat instance.  If
I
> can get jk2 to establish a new connection with every request this problem
> disappears.  No matter what I do I can't get this to happen.
>
> Thanks!
> Mark
>
> -----Original Message-----
> From: Eric J. Pinnell [mailto:eric@iCky.org]
> Sent: Monday, August 11, 2003 5:04 PM
> To: Tomcat Users List
> Subject: Re: Hardware loadbalancing with JK2
>
>
> Hi,
>
> Using the CSS between Apache and Tomcat seems a bit overkill as Tomcat
> provides all the functionality that a CSS would.  However I think you can
> get it to work.  All you need is a single worker to the CSS.  From there
> the CSS should bust it out and spread it across the various Tomcats.
> There wouldn't be any loadbalancing in the JK2 configuration.
>
> Just like a web server might have multiple hosts behind it, to the outside
> world you only see one IP.  Same thing goes for JK2.
>
> I don't have a properties file handy but search the archives and you'll
> find an example.  You just want a real basic single worker config.  I
> think there might be one in the JK2 docs.
>
> Make sure to configure the CSS to make the sessions sticky by some
> mechanism (unless you are using clustering) otherwise Tomcat could goof
> up.
>
> -e
>
> On Mon, 11 Aug 2003, Mark Gastel wrote:
>
> > Hi,
> >
> > I am trying to get hardware load balancing to work between apache
> > 2.0.46/mod_jk2, a cisco css and tomcat 4.1.27.  The way this works is an
> > ajp13 service has been created on the css.  Apache talks to this css ajp
> > service which is split among several tomcat instances...  Now the
problem:
> > Because mod_jk2 seems to have some form of connection caching going,
when
> I
> > disable a tomcat instance it still receives ajp13 connections.  Is there
a
> > way to disable the connection caching in JK2 and forcing it to establish
a
> > new connection with every hit?  I know this would give a performance
hit,
> > but it will give me fine grain control over how traffic is distributed.
> >
> > If you could attach a piece of a workers2.properties file I would really
> > appreciate it!!
> > Thanks
> > Mark
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Hardware loadbalancing with JK2

Posted by Mark Gastel <mg...@abebooks.com>.
Hi Eric,

Thanks!  The connectionTimeout did the trick.  I was so focused on the jk2
side I didn't think about that tomcat might be holding the connection open.
M


-----Original Message-----
From: Eric J. Pinnell [mailto:eric@iCky.org]
Sent: Tuesday, August 12, 2003 4:02 AM
To: Tomcat Users List
Subject: RE: Hardware loadbalancing with JK2


Make sure you have a connectionTimout defined in your server.xml for the
coyote connector.  By default it's 0 (which I gather to be infinite).

Setting it to 60000 or 120000 will make the connection timeout.  I am
unsure about the cache thing you are talking about because I just use the
normal JK2 loadbalancing but it seems that if you make the connections
timeout it won't send a keepalive.

-e

On Mon, 11 Aug 2003, Mark Gastel wrote:

> Hi Eric,
>
> Thanks.  At this point I'm a bit more comfortable using a hardware
> loadbalancer over the jk2 stuff.  we've been using a css in production for
> well over a year.  Unlike tomcat or apache I've seen very little movement
in
> the jk2 code base and the documentation is very confusing at times.
>
> My problem is not the basic configuration ...I have a working setup.  My
> problem is because mod_jk2 is using a connection cache (keepalive
> connections or something) it is sending requests to a service that has
been
> disabled.  This really sucks if you want to upgrade a tomcat instance.  If
I
> can get jk2 to establish a new connection with every request this problem
> disappears.  No matter what I do I can't get this to happen.
>
> Thanks!
> Mark
>
> -----Original Message-----
> From: Eric J. Pinnell [mailto:eric@iCky.org]
> Sent: Monday, August 11, 2003 5:04 PM
> To: Tomcat Users List
> Subject: Re: Hardware loadbalancing with JK2
>
>
> Hi,
>
> Using the CSS between Apache and Tomcat seems a bit overkill as Tomcat
> provides all the functionality that a CSS would.  However I think you can
> get it to work.  All you need is a single worker to the CSS.  From there
> the CSS should bust it out and spread it across the various Tomcats.
> There wouldn't be any loadbalancing in the JK2 configuration.
>
> Just like a web server might have multiple hosts behind it, to the outside
> world you only see one IP.  Same thing goes for JK2.
>
> I don't have a properties file handy but search the archives and you'll
> find an example.  You just want a real basic single worker config.  I
> think there might be one in the JK2 docs.
>
> Make sure to configure the CSS to make the sessions sticky by some
> mechanism (unless you are using clustering) otherwise Tomcat could goof
> up.
>
> -e
>
> On Mon, 11 Aug 2003, Mark Gastel wrote:
>
> > Hi,
> >
> > I am trying to get hardware load balancing to work between apache
> > 2.0.46/mod_jk2, a cisco css and tomcat 4.1.27.  The way this works is an
> > ajp13 service has been created on the css.  Apache talks to this css ajp
> > service which is split among several tomcat instances...  Now the
problem:
> > Because mod_jk2 seems to have some form of connection caching going,
when
> I
> > disable a tomcat instance it still receives ajp13 connections.  Is there
a
> > way to disable the connection caching in JK2 and forcing it to establish
a
> > new connection with every hit?  I know this would give a performance
hit,
> > but it will give me fine grain control over how traffic is distributed.
> >
> > If you could attach a piece of a workers2.properties file I would really
> > appreciate it!!
> > Thanks
> > Mark
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



RE: Hardware loadbalancing with JK2

Posted by "Eric J. Pinnell" <er...@iCky.org>.
Make sure you have a connectionTimout defined in your server.xml for the
coyote connector.  By default it's 0 (which I gather to be infinite).

Setting it to 60000 or 120000 will make the connection timeout.  I am
unsure about the cache thing you are talking about because I just use the
normal JK2 loadbalancing but it seems that if you make the connections
timeout it won't send a keepalive.

-e

On Mon, 11 Aug 2003, Mark Gastel wrote:

> Hi Eric,
>
> Thanks.  At this point I'm a bit more comfortable using a hardware
> loadbalancer over the jk2 stuff.  we've been using a css in production for
> well over a year.  Unlike tomcat or apache I've seen very little movement in
> the jk2 code base and the documentation is very confusing at times.
>
> My problem is not the basic configuration ...I have a working setup.  My
> problem is because mod_jk2 is using a connection cache (keepalive
> connections or something) it is sending requests to a service that has been
> disabled.  This really sucks if you want to upgrade a tomcat instance.  If I
> can get jk2 to establish a new connection with every request this problem
> disappears.  No matter what I do I can't get this to happen.
>
> Thanks!
> Mark
>
> -----Original Message-----
> From: Eric J. Pinnell [mailto:eric@iCky.org]
> Sent: Monday, August 11, 2003 5:04 PM
> To: Tomcat Users List
> Subject: Re: Hardware loadbalancing with JK2
>
>
> Hi,
>
> Using the CSS between Apache and Tomcat seems a bit overkill as Tomcat
> provides all the functionality that a CSS would.  However I think you can
> get it to work.  All you need is a single worker to the CSS.  From there
> the CSS should bust it out and spread it across the various Tomcats.
> There wouldn't be any loadbalancing in the JK2 configuration.
>
> Just like a web server might have multiple hosts behind it, to the outside
> world you only see one IP.  Same thing goes for JK2.
>
> I don't have a properties file handy but search the archives and you'll
> find an example.  You just want a real basic single worker config.  I
> think there might be one in the JK2 docs.
>
> Make sure to configure the CSS to make the sessions sticky by some
> mechanism (unless you are using clustering) otherwise Tomcat could goof
> up.
>
> -e
>
> On Mon, 11 Aug 2003, Mark Gastel wrote:
>
> > Hi,
> >
> > I am trying to get hardware load balancing to work between apache
> > 2.0.46/mod_jk2, a cisco css and tomcat 4.1.27.  The way this works is an
> > ajp13 service has been created on the css.  Apache talks to this css ajp
> > service which is split among several tomcat instances...  Now the problem:
> > Because mod_jk2 seems to have some form of connection caching going,  when
> I
> > disable a tomcat instance it still receives ajp13 connections.  Is there a
> > way to disable the connection caching in JK2 and forcing it to establish a
> > new connection with every hit?  I know this would give a performance hit,
> > but it will give me fine grain control over how traffic is distributed.
> >
> > If you could attach a piece of a workers2.properties file I would really
> > appreciate it!!
> > Thanks
> > Mark
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Hardware loadbalancing with JK2

Posted by "Eric J. Pinnell" <er...@iCky.org>.
Make sure you have a connectionTimout defined in your server.xml for the
coyote connector.  By default it's 0 (which I gather to be infinite).

Setting it to 60000 or 120000 will make the connection timeout.  I am
unsure about the cache thing you are talking about because I just use the
normal JK2 loadbalancing but it seems that if you make the connections
timeout it won't send a keepalive.

-e

On Mon, 11 Aug 2003, Mark Gastel wrote:

> Hi Eric,
>
> Thanks.  At this point I'm a bit more comfortable using a hardware
> loadbalancer over the jk2 stuff.  we've been using a css in production for
> well over a year.  Unlike tomcat or apache I've seen very little movement in
> the jk2 code base and the documentation is very confusing at times.
>
> My problem is not the basic configuration ...I have a working setup.  My
> problem is because mod_jk2 is using a connection cache (keepalive
> connections or something) it is sending requests to a service that has been
> disabled.  This really sucks if you want to upgrade a tomcat instance.  If I
> can get jk2 to establish a new connection with every request this problem
> disappears.  No matter what I do I can't get this to happen.
>
> Thanks!
> Mark
>
> -----Original Message-----
> From: Eric J. Pinnell [mailto:eric@iCky.org]
> Sent: Monday, August 11, 2003 5:04 PM
> To: Tomcat Users List
> Subject: Re: Hardware loadbalancing with JK2
>
>
> Hi,
>
> Using the CSS between Apache and Tomcat seems a bit overkill as Tomcat
> provides all the functionality that a CSS would.  However I think you can
> get it to work.  All you need is a single worker to the CSS.  From there
> the CSS should bust it out and spread it across the various Tomcats.
> There wouldn't be any loadbalancing in the JK2 configuration.
>
> Just like a web server might have multiple hosts behind it, to the outside
> world you only see one IP.  Same thing goes for JK2.
>
> I don't have a properties file handy but search the archives and you'll
> find an example.  You just want a real basic single worker config.  I
> think there might be one in the JK2 docs.
>
> Make sure to configure the CSS to make the sessions sticky by some
> mechanism (unless you are using clustering) otherwise Tomcat could goof
> up.
>
> -e
>
> On Mon, 11 Aug 2003, Mark Gastel wrote:
>
> > Hi,
> >
> > I am trying to get hardware load balancing to work between apache
> > 2.0.46/mod_jk2, a cisco css and tomcat 4.1.27.  The way this works is an
> > ajp13 service has been created on the css.  Apache talks to this css ajp
> > service which is split among several tomcat instances...  Now the problem:
> > Because mod_jk2 seems to have some form of connection caching going,  when
> I
> > disable a tomcat instance it still receives ajp13 connections.  Is there a
> > way to disable the connection caching in JK2 and forcing it to establish a
> > new connection with every hit?  I know this would give a performance hit,
> > but it will give me fine grain control over how traffic is distributed.
> >
> > If you could attach a piece of a workers2.properties file I would really
> > appreciate it!!
> > Thanks
> > Mark
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>

RE: Hardware loadbalancing with JK2

Posted by Mark Gastel <mg...@abebooks.com>.
Hi Eric,

Thanks.  At this point I'm a bit more comfortable using a hardware
loadbalancer over the jk2 stuff.  we've been using a css in production for
well over a year.  Unlike tomcat or apache I've seen very little movement in
the jk2 code base and the documentation is very confusing at times.

My problem is not the basic configuration ...I have a working setup.  My
problem is because mod_jk2 is using a connection cache (keepalive
connections or something) it is sending requests to a service that has been
disabled.  This really sucks if you want to upgrade a tomcat instance.  If I
can get jk2 to establish a new connection with every request this problem
disappears.  No matter what I do I can't get this to happen.

Thanks!
Mark

-----Original Message-----
From: Eric J. Pinnell [mailto:eric@iCky.org]
Sent: Monday, August 11, 2003 5:04 PM
To: Tomcat Users List
Subject: Re: Hardware loadbalancing with JK2


Hi,

Using the CSS between Apache and Tomcat seems a bit overkill as Tomcat
provides all the functionality that a CSS would.  However I think you can
get it to work.  All you need is a single worker to the CSS.  From there
the CSS should bust it out and spread it across the various Tomcats.
There wouldn't be any loadbalancing in the JK2 configuration.

Just like a web server might have multiple hosts behind it, to the outside
world you only see one IP.  Same thing goes for JK2.

I don't have a properties file handy but search the archives and you'll
find an example.  You just want a real basic single worker config.  I
think there might be one in the JK2 docs.

Make sure to configure the CSS to make the sessions sticky by some
mechanism (unless you are using clustering) otherwise Tomcat could goof
up.

-e

On Mon, 11 Aug 2003, Mark Gastel wrote:

> Hi,
>
> I am trying to get hardware load balancing to work between apache
> 2.0.46/mod_jk2, a cisco css and tomcat 4.1.27.  The way this works is an
> ajp13 service has been created on the css.  Apache talks to this css ajp
> service which is split among several tomcat instances...  Now the problem:
> Because mod_jk2 seems to have some form of connection caching going,  when
I
> disable a tomcat instance it still receives ajp13 connections.  Is there a
> way to disable the connection caching in JK2 and forcing it to establish a
> new connection with every hit?  I know this would give a performance hit,
> but it will give me fine grain control over how traffic is distributed.
>
> If you could attach a piece of a workers2.properties file I would really
> appreciate it!!
> Thanks
> Mark
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



RE: Hardware loadbalancing with JK2

Posted by Mark Gastel <mg...@abebooks.com>.
Hi Eric,

Thanks.  At this point I'm a bit more comfortable using a hardware
loadbalancer over the jk2 stuff.  we've been using a css in production for
well over a year.  Unlike tomcat or apache I've seen very little movement in
the jk2 code base and the documentation is very confusing at times.

My problem is not the basic configuration ...I have a working setup.  My
problem is because mod_jk2 is using a connection cache (keepalive
connections or something) it is sending requests to a service that has been
disabled.  This really sucks if you want to upgrade a tomcat instance.  If I
can get jk2 to establish a new connection with every request this problem
disappears.  No matter what I do I can't get this to happen.

Thanks!
Mark

-----Original Message-----
From: Eric J. Pinnell [mailto:eric@iCky.org]
Sent: Monday, August 11, 2003 5:04 PM
To: Tomcat Users List
Subject: Re: Hardware loadbalancing with JK2


Hi,

Using the CSS between Apache and Tomcat seems a bit overkill as Tomcat
provides all the functionality that a CSS would.  However I think you can
get it to work.  All you need is a single worker to the CSS.  From there
the CSS should bust it out and spread it across the various Tomcats.
There wouldn't be any loadbalancing in the JK2 configuration.

Just like a web server might have multiple hosts behind it, to the outside
world you only see one IP.  Same thing goes for JK2.

I don't have a properties file handy but search the archives and you'll
find an example.  You just want a real basic single worker config.  I
think there might be one in the JK2 docs.

Make sure to configure the CSS to make the sessions sticky by some
mechanism (unless you are using clustering) otherwise Tomcat could goof
up.

-e

On Mon, 11 Aug 2003, Mark Gastel wrote:

> Hi,
>
> I am trying to get hardware load balancing to work between apache
> 2.0.46/mod_jk2, a cisco css and tomcat 4.1.27.  The way this works is an
> ajp13 service has been created on the css.  Apache talks to this css ajp
> service which is split among several tomcat instances...  Now the problem:
> Because mod_jk2 seems to have some form of connection caching going,  when
I
> disable a tomcat instance it still receives ajp13 connections.  Is there a
> way to disable the connection caching in JK2 and forcing it to establish a
> new connection with every hit?  I know this would give a performance hit,
> but it will give me fine grain control over how traffic is distributed.
>
> If you could attach a piece of a workers2.properties file I would really
> appreciate it!!
> Thanks
> Mark
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Hardware loadbalancing with JK2

Posted by "Eric J. Pinnell" <er...@iCky.org>.
Hi,

Using the CSS between Apache and Tomcat seems a bit overkill as Tomcat
provides all the functionality that a CSS would.  However I think you can
get it to work.  All you need is a single worker to the CSS.  From there
the CSS should bust it out and spread it across the various Tomcats.
There wouldn't be any loadbalancing in the JK2 configuration.

Just like a web server might have multiple hosts behind it, to the outside
world you only see one IP.  Same thing goes for JK2.

I don't have a properties file handy but search the archives and you'll
find an example.  You just want a real basic single worker config.  I
think there might be one in the JK2 docs.

Make sure to configure the CSS to make the sessions sticky by some
mechanism (unless you are using clustering) otherwise Tomcat could goof
up.

-e

On Mon, 11 Aug 2003, Mark Gastel wrote:

> Hi,
>
> I am trying to get hardware load balancing to work between apache
> 2.0.46/mod_jk2, a cisco css and tomcat 4.1.27.  The way this works is an
> ajp13 service has been created on the css.  Apache talks to this css ajp
> service which is split among several tomcat instances...  Now the problem:
> Because mod_jk2 seems to have some form of connection caching going,  when I
> disable a tomcat instance it still receives ajp13 connections.  Is there a
> way to disable the connection caching in JK2 and forcing it to establish a
> new connection with every hit?  I know this would give a performance hit,
> but it will give me fine grain control over how traffic is distributed.
>
> If you could attach a piece of a workers2.properties file I would really
> appreciate it!!
> Thanks
> Mark
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Hardware loadbalancing with JK2

Posted by "Eric J. Pinnell" <er...@iCky.org>.
Hi,

Using the CSS between Apache and Tomcat seems a bit overkill as Tomcat
provides all the functionality that a CSS would.  However I think you can
get it to work.  All you need is a single worker to the CSS.  From there
the CSS should bust it out and spread it across the various Tomcats.
There wouldn't be any loadbalancing in the JK2 configuration.

Just like a web server might have multiple hosts behind it, to the outside
world you only see one IP.  Same thing goes for JK2.

I don't have a properties file handy but search the archives and you'll
find an example.  You just want a real basic single worker config.  I
think there might be one in the JK2 docs.

Make sure to configure the CSS to make the sessions sticky by some
mechanism (unless you are using clustering) otherwise Tomcat could goof
up.

-e

On Mon, 11 Aug 2003, Mark Gastel wrote:

> Hi,
>
> I am trying to get hardware load balancing to work between apache
> 2.0.46/mod_jk2, a cisco css and tomcat 4.1.27.  The way this works is an
> ajp13 service has been created on the css.  Apache talks to this css ajp
> service which is split among several tomcat instances...  Now the problem:
> Because mod_jk2 seems to have some form of connection caching going,  when I
> disable a tomcat instance it still receives ajp13 connections.  Is there a
> way to disable the connection caching in JK2 and forcing it to establish a
> new connection with every hit?  I know this would give a performance hit,
> but it will give me fine grain control over how traffic is distributed.
>
> If you could attach a piece of a workers2.properties file I would really
> appreciate it!!
> Thanks
> Mark
>