tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: svn commit: r1174289 - in /tomcat/jk/trunk: native/apache-1.3/ native/apache-2.0/ native/common/ native/iis/ xdocs/miscellaneous/ xdocs/reference/
Date Thu, 22 Sep 2011 19:14:06 GMT
On 22.09.2011 20:33, Konstantin Kolinko wrote:
> 2011/9/22  <rjung@apache.org>:
>> Author: rjung
>> Date: Thu Sep 22 18:01:31 2011
>> New Revision: 1174289
>>
>> URL: http://svn.apache.org/viewvc?rev=1174289&view=rev
>> Log:
>> - URI Map: Add "sticky_ignore" extension attributes to uri worker map.
>>  It allows to disable stickyness for individual mounts.
>>
>> - HTTPD: Allow dynamic disabling of stickyness using the environment
>>  variable JK_STICKY_IGNORE. This can be useful to break cookie stickyness
>>  for non-sticky requests like login forms.
>>
>> Modified:
>>    tomcat/jk/trunk/native/apache-1.3/mod_jk.c
>>    tomcat/jk/trunk/native/apache-2.0/mod_jk.c
>>    tomcat/jk/trunk/native/common/jk_lb_worker.c
>>    tomcat/jk/trunk/native/common/jk_service.h
>>    tomcat/jk/trunk/native/common/jk_status.c
>>    tomcat/jk/trunk/native/common/jk_uri_worker_map.c
>>    tomcat/jk/trunk/native/common/jk_uri_worker_map.h
>>    tomcat/jk/trunk/native/common/jk_util.c
>>    tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
>>    tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
>>    tomcat/jk/trunk/xdocs/reference/apache.xml
>>    tomcat/jk/trunk/xdocs/reference/uriworkermap.xml
>>    tomcat/jk/trunk/xdocs/reference/workers.xml
>>
>> Modified: tomcat/jk/trunk/native/apache-1.3/mod_jk.c
>> URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-1.3/mod_jk.c?rev=1174289&r1=1174288&r2=1174289&view=diff
>>
> ==============================================================================
> (...)
>> +    sticky_ignore = ap_table_get(r->subprocess_env, JK_ENV_STICKY_IGNORE);
>> +    if (sticky_ignore) {
>> +        if (*sticky_ignore == '\0') {
>> +            s->extension.reply_timeout = JK_TRUE;
> 
> You are assigning to a wrong option!
> Below and in httpd 2.0 version as well.

Copy&Paste - thanks a million - fixed in r1174314.

> Also the above means that if the variable is present, but has empty
> value, it is threated as true? This flag is false by default
> elsewhere.

Yes, I made a difference here betwenn the env var and the extension.
Usually if an env var flags a boolean value, setting the variable is
assumed to be equal to true. Setting it to "0" is supported here to
reset, because onemight end up with a set of RewriteRules setting the
env var and not all 2.2 version support unsetting in RewriteRule.

For the worker map extension it seems not necessary, because a more
special rule can simply omit the extension.

P.S.: I hope the use case in the docs is understandable. I didn't want
to make it to long.

The idea is: Once a cookie is set, there is some likelihood, that a user
might come back to the app with the old session cookie, but in fact
without a resuable session. Until now we would still route him to the
old node, which might be bad, e.g. if we want to drain it, or if we want
to balance with the session count method. So we allow the admin to
configure a URL which he knows is an entry point to the application and
does not yet need stickyness.

Anotherway would be mod_headers tricking into deleteingthe JSESSIONID
cookie before mod_jk checks it, but that is much more complicated.

In addition, the JK_STICKY_IGNORE also "resets" stickyness, if the user
came back via a bookmark with a jsessionid encoded. As soon as he
requests the configured URL we will send him to a non-sticky node.

I plan to add to additional features:

a) round robin balancing
b) ability to mark requests as not influencing balancing counter
   (lb_value)

b) improves session load balancing for the session and round-robin
balancing methods. If there is static content, that is not URL encoded,
or that is loaded before the session, until now we count each such
request as a new session. This is not what we want. Of course static
content should be moved to Apache directly and JkUnMounted, but
unfortunately that's not always the case ...

Requests falling into category b), e.g. that have no session id, but we
don't want to take them into account w.r.t. load balancing, I plan to
balance with a separate round-robin index.

Regards,

Rainer

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


Mime
View raw message