On Mon, 2007-05-07 at 21:05 +0200, Ruediger Pluem wrote: > > 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).
Yes we should avoid adjust sessionstickyness via the loadbalancer manager because it won't work with prefork and worker mpm. > > 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 > |) Right no need of the else here. Cheers Jean-Frederic > > > Regards > > Rüdiger > >