httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <rpl...@apache.org>
Subject Re: Bug 41897 / Session-Stickiness with mod_proxy_balancer
Date Mon, 07 May 2007 19:05:27 GMT


On 05/07/2007 05:56 PM, Mladen Turk wrote:

> 
> I think we could use a simple two use case situation.
> To be able to backport that to the 2.2 branch I propose
> a following patch.
> 
> It adds additional struct member sticky_path that is
> set to the sticky so if someone has in the config
> 
> ... stickysession=JSESSIONID ... both sticky and
> sticky_path will be the same.
> However if there is a stickysession with
> ... stickysession=JSESSIONID|;jsessionid ...
> will make w->sticky=JSESSIONID and w->sticky_path=;jsessionid
> 
> I'm not aware of any other way without introducing additional
> directives that could be backported to 2.2
> 
> The question is, is that backportable as well?

I think this is backportable in general if we do a minor bump (which
is possible for backports). Currently I see the following problems
with the patch which seem to be solvable:

1. Documentation.
   We definitely need a patch for the documentation that describes how
   to handle the servlet case with the above patch. Otherwise people keep
   falling into the pit.

2. Apart from route search balancer->sticky is used in several additional
   locations for

   - Status pages (mod_status hook, loadbalancer manager)
   - Some notes / environment variables are set to balancer->sticky which is
     wrong if balancer->sticky_path was used to find the actual route.
     Furthermore it might be worth adding an additional environment variable
     (e.g. BALANCER_SESSION_STICKY_TYPE) that indicates whether
     BALANCER_SESSION_STICKY contains balancer->sticky or balancer->sticky_path.

   Adjusting sessionstickyness via the loadbalancer manager might not be needed as this
   currently does not work anyway since the balancer configuration is not stored in shared
   memory (Maybe we should turn off the possibility to change the balancer configuration via
   the manager until this is fixed as this can lead to weird results with different
   processes using different configurations).

3. The minor bump is missing which is needed due to the change of the struct.

4. I am confused by the following part of the patch :-):

+        balancer->sticky = balancer->sticky_path = apr_pstrdup(p, val);
+        if ((path = strchr(balancer->sticky, '|'))) {
+            *path++ = '\0';
+            balancer->sticky_path = path;
+        }
+        else
+            balancer->sticky_path = balancer->sticky;

Why setting balancer->sticky_path twice in both cases (string with or without |)


Regards

RĂ¼diger



Mime
View raw message