You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Mladen Turk <mt...@apache.org> on 2004/11/08 15:04:35 UTC
Newest JK commits
Hi all,
I've done some JK commits that I've been testing for a long time.
The major addition is socket timeout that was missing, causing
couple of minutes delays on some platforms if tomcat was down.
Also I've back ported the load balance algorithm from proxy_balancer,
that actually does what it should.
For example the A:lb_factor=5 and B:lb_factor=1 will now give five
times more requests to host A.
I have also changed one very misleading directive (socket_timeout)
to recycle_timeout. The socket_timeout directive is now what it
should be (the timeout for the socket), while the recycle_timeout is
the inactive socket timeout.
I have also revert Jean-Frederic's latest map_free changes (by mistake).
Further more IMO we should prefix all public functions using jk_.
That's about it.
I have tested all patches on unix and win32. What I'd like to see is
if I broke something on AIX (Henry ?) and Netware (Norm, Guenter?)
Cheers,
MLaden.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: Questions on mod_jk, session affinity, etc
Posted by Sandy McArthur <Sa...@McArthur.org>.
On Nov 9, 2004, at 10:00 PM, Jess Holle wrote:
> is there any hope/possibility/interest of trying to balance the number
> of active sessions per Tomcat instance (i.e. sending new requests to
> the instance with the fewest active sessions)?
We (UF, I cannot claim to represent the tomcat devs) are happy with a
simple round robin distribution for new requests. We have 8 tomcat
clones for simple load balancing and given enough users it all evens
out. We've gutted the existing balancing code in mod_jk because it was
broken and put in our own more simple algorithm that doesn't do load
factors. Hopefully the balancing code back ported from the mod_proxy
efforts will do the trick and we can ditch our own stuff.
Anyway, trying to be too smart in sending new requests to clones with
the fewest number of sessions would probably create this weird flow
where new users gravitate to the same clone as a batch of users
sessions expire.
Even if that isn't the case, it's in our interests to separate new
sessions between clones. Typically for us the first request a user
makes after login is the most cpu/time intensive because we need lookup
extended info about the user and generally setup their session.
--
Sandy McArthur
"He who dares not offend cannot be honest."
- Thomas Paine
Questions on mod_jk, session affinity, etc
Posted by Jess Holle <je...@ptc.com>.
For cases where the session data is too large and/or volatile to
replicate without a performance penalty and where session affinity is
thus required, is there any hope/possibility/interest of trying to
balance the number of active sessions per Tomcat instance (i.e. sending
new requests to the instance with the fewest active sessions)?
Or is there any possibility of "transfering" a session from one Tomcat
instance to another when one gets overloaded -- rather than continually
replicating every change to the session across all instances? [This
would seem to require changes to Tomcat and mod_jk/mod_proxy_ajp, right?]
--
Jess Holle
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: Newest JK commits
Posted by Jess Holle <je...@ptc.com>.
Mladen Turk wrote:
> Jess Holle wrote:
>
>> Mladen Turk wrote:
>>
>>> I've done some JK commits that I've been testing for a long time.
>>
>> Have you updated the docs for the lb_factor and socket_timeout changes?
>
> That's the thing I'm planing for the all next week.
> I would like to rewrite the entire JK docs using Tomcat's
> style and build process.
> Also we should make clear what we are going to support
> (making JK2 as unsupported), advertising new mod_proxy and proxy_ajp,
> etc.
Style is well and good, but the clarity around JK2, etc, is priceless!
--
Jess Holle
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: Newest JK commits
Posted by Mladen Turk <mt...@apache.org>.
Jess Holle wrote:
> Mladen Turk wrote:
>
>>
>> I've done some JK commits that I've been testing for a long time.
>
>
> Have you updated the docs for the lb_factor and socket_timeout changes?
>
That's the thing I'm planing for the all next week.
I would like to rewrite the entire JK docs using Tomcat's
style and build process.
Also we should make clear what we are going to support
(making JK2 as unsupported), advertising new mod_proxy and proxy_ajp,
etc.
MT.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: Newest JK commits
Posted by Jess Holle <je...@ptc.com>.
Mladen Turk wrote:
> Hi all,
>
> I've done some JK commits that I've been testing for a long time.
> The major addition is socket timeout that was missing, causing
> couple of minutes delays on some platforms if tomcat was down.
>
> Also I've back ported the load balance algorithm from proxy_balancer,
> that actually does what it should.
> For example the A:lb_factor=5 and B:lb_factor=1 will now give five
> times more requests to host A.
>
> I have also changed one very misleading directive (socket_timeout)
> to recycle_timeout. The socket_timeout directive is now what it
> should be (the timeout for the socket), while the recycle_timeout is
> the inactive socket timeout.
Have you updated the docs for the lb_factor and socket_timeout changes?
> I have also revert Jean-Frederic's latest map_free changes (by mistake).
> Further more IMO we should prefix all public functions using jk_.
>
> That's about it.
> I have tested all patches on unix and win32. What I'd like to see is
> if I broke something on AIX (Henry ?) and Netware (Norm, Guenter?)
>
> Cheers,
> MLaden.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: Newest JK commits
Posted by Mladen Turk <mt...@apache.org>.
NormW wrote:
> # Undefined symbol: 'jk_map_free'
>
> A text search of the jtc source tree fails ...
Yep, sorry, mea culpa.
I have broken the build reverting Jean-Frederic's latest patches
map_free -> jk_map_free.
I have extended it's idea and prefixed all map_xxx function with
jk namespace.
Regards,
Mladen
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: Newest JK commits
Posted by NormW <no...@bocnet.com.au>.
NormW wrote:
> Mladen Turk wrote:
>
>> NormW wrote:
>>
>>> Missed a patch perhaps?
>>> A build on Apache 2.1 shows symbols F_GETFL, F_SETFL as undefined and
>>> a text search through the JTC source tree finds the only references
>>> in jk_connect.c
>>> Norm
>>>
>>
>> Seems that we are missing header on Netware.
>> IMO the F_GETFL/F_SETFL are defined inside <nks/fsio.h>, correct?
>> I have added the needed header to jk_global.h. Can you check that?
>> If it still doesn't compile can you figure out the needed header
>> files.
>>
>>
>> MT.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>>
>>
>> .
>>
> Good evening,
> From a 'quick' check, F_GETFL and F_SETFL are in fcntl.h, and can get
> passed the previous error by just adding "fcntl.h" on its own at the
> same place you did (seems errno.h isn't required at this point, but so
> far I'm just trying a build with 2.1).
> However, I now get the following error:
>
> Generating Release\mod_jk_link.opt
> Linking Release/mod_jk.nlm
> ### mwldnlm Linker Error:
> # Undefined symbol: 'jk_map_free'
> # referenced from 'jk_apr_pool_cleanup' in mod_jk.o
> # referenced from 'jk_apr_pool_cleanup' in mod_jk.o
> # referenced from 'jk_apr_pool_cleanup' in mod_jk.o
>
> A text search of the jtc source tree fails to find any reference to
> where this is definded, which from its prefix, I assume is supposed to
> be in there somewhere...
> Norm
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>
> .
>
So goes another day.
Greetings,
Attached are two diff's that, along with the jk_map_free{} updates now
let mod_jk build for apache 1.3.33, 2.0.52 and 2.1.
1. The fcntl.h is needed for both apache 1.3 (using CLIB) and 2.x using
LibC, and there is a fcntl.h accessible in both libraries. The error.h
proved to be unrequired AFAICT and the patch removes it.
2. The uint32_t appears, AFAICT, only referenced within the Apache2
build, where most references use apr_uint32_t... so patch 2 to jk_md5.h
provides an alternate (same) definiton normally exported in the Apache2
build but only makes this available when not using LIBC, ie when
building Apache 1.3.
The built nlm's were 'trialed' on a NetWare platform and no problems
access Tomcat were experienced during a brief test.
Prudence suggests a more experienced NetWare peron might want to check
these patches over, but for the moment at least, these seem to work.
Norm
jk_global.h
--- jk_global.h.orig 2004-11-09 20:17:04.000000000 +1100
+++ jk_global.h 2004-11-10 10:44:21.000000000 +1100
@@ -65,14 +65,13 @@
#include <unistd.h>
#if defined(NETWARE) && defined(__NOVELL_LIBC__)
#include "novsock2.h"
-#include <nks/fsio.h>
-#include <nks/errno.h>
#define __sys_socket_h__
#define __netdb_h__
#define __netinet_in_h__
#define HAVE_VSNPRINTF
#define HAVE_SNPRINTF
#endif
+#include "fcntl.h"
#include <netdb.h>
#include <netinet/in.h>
#include <sys/socket.h>
jk_md5.h
--- jk_md5.h.orig 2004-11-09 06:24:25.000000000 +1100
+++ jk_md5.h 2004-11-10 10:28:52.000000000 +1100
@@ -60,8 +60,12 @@
#ifdef WIN32
typedef DWORD JK_UINT4;
#else
+#if defined(NETWARE) && !defined(__NOVELL_LIBC__)
+ typedef unsigned long int JK_UINT4;
+#else
typedef uint32_t JK_UINT4;
#endif
+#endif
/* MD5 context. */
typedef struct
Re: Newest JK commits
Posted by NormW <no...@bocnet.com.au>.
Mladen Turk wrote:
> NormW wrote:
>
>> Missed a patch perhaps?
>> A build on Apache 2.1 shows symbols F_GETFL, F_SETFL as undefined and
>> a text search through the JTC source tree finds the only references in
>> jk_connect.c
>> Norm
>>
>
> Seems that we are missing header on Netware.
> IMO the F_GETFL/F_SETFL are defined inside <nks/fsio.h>, correct?
> I have added the needed header to jk_global.h. Can you check that?
> If it still doesn't compile can you figure out the needed header
> files.
>
>
> MT.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>
> .
>
Good evening,
From a 'quick' check, F_GETFL and F_SETFL are in fcntl.h, and can get
passed the previous error by just adding "fcntl.h" on its own at the
same place you did (seems errno.h isn't required at this point, but so
far I'm just trying a build with 2.1).
However, I now get the following error:
Generating Release\mod_jk_link.opt
Linking Release/mod_jk.nlm
### mwldnlm Linker Error:
# Undefined symbol: 'jk_map_free'
# referenced from 'jk_apr_pool_cleanup' in mod_jk.o
# referenced from 'jk_apr_pool_cleanup' in mod_jk.o
# referenced from 'jk_apr_pool_cleanup' in mod_jk.o
A text search of the jtc source tree fails to find any reference to
where this is definded, which from its prefix, I assume is supposed to
be in there somewhere...
Norm
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: Newest JK commits
Posted by Mladen Turk <mt...@apache.org>.
NormW wrote:
> Missed a patch perhaps?
> A build on Apache 2.1 shows symbols F_GETFL, F_SETFL as undefined and a
> text search through the JTC source tree finds the only references in
> jk_connect.c
> Norm
>
Seems that we are missing header on Netware.
IMO the F_GETFL/F_SETFL are defined inside <nks/fsio.h>, correct?
I have added the needed header to jk_global.h. Can you check that?
If it still doesn't compile can you figure out the needed header
files.
MT.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: Newest JK commits
Posted by NormW <no...@bocnet.com.au>.
Mladen Turk wrote:
> Hi all,
>
> I've done some JK commits that I've been testing for a long time.
> The major addition is socket timeout that was missing, causing
> couple of minutes delays on some platforms if tomcat was down.
>
> Also I've back ported the load balance algorithm from proxy_balancer,
> that actually does what it should.
> For example the A:lb_factor=5 and B:lb_factor=1 will now give five
> times more requests to host A.
>
> I have also changed one very misleading directive (socket_timeout)
> to recycle_timeout. The socket_timeout directive is now what it
> should be (the timeout for the socket), while the recycle_timeout is
> the inactive socket timeout.
>
> I have also revert Jean-Frederic's latest map_free changes (by mistake).
> Further more IMO we should prefix all public functions using jk_.
>
> That's about it.
> I have tested all patches on unix and win32. What I'd like to see is
> if I broke something on AIX (Henry ?) and Netware (Norm, Guenter?)
>
> Cheers,
> MLaden.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>
> .
>
Good morning,
Missed a patch perhaps?
A build on Apache 2.1 shows symbols F_GETFL, F_SETFL as undefined and a
text search through the JTC source tree finds the only references in
jk_connect.c
Norm
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org