https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

             Bug #: 51247
           Summary: Enhance mod_proxy and _balancer with worker status
                    flag to only accept sticky session routes
           Product: Apache httpd-2
           Version: 2.2.17
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: mod_proxy
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified


Created attachment 27047
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27047
Enhance mod_proxy and _balancer with worker status flag to only accept sticky
session routes

This enhancement, actually SVN Patched against 2.2.19, provides a worker status
flag to set a proxy worker as only accepting requests with sticky session
routes, e.g. only accept requests with a .route such as Cookie
JSESSIONID=xxx.tc2.

This allows for a graceful fade-out of servers when their sessions are removed;
they continue to receive requests for their sticky session routes but are
passed over for requests with no specified route, just as if they were
disabled.  In other words, route-only workers are only enabled for sticky
session routes.

Intended use (Tomcat JSESSIONID noted here but could be PHPSESSIONID, Ruby
_session_id, or anything with cookie or request-parameter based session ids):
1. An Apache rev-proxy running for multiple Tomcats.
2. To fade-out a Tomcat for maintenance, set route-only enabled in the
balancer-manager or reload the configuration with the worker status +R.
(This depends on Tomcat web-apps delete session cookies, see further below.)
3. Check on the balancer-manager or its Tomcat worker even a few minutes /
hours, and when it seems to have completed old sessions you can mark it fully
disabled/
4. Once done maintenance, you can then set route-only disabled (status -R) and
fully enable the worker again.

To delete a JSESSIONID Cookie from a Servlet, you need to specify the same
Domain and Path as the original Cookie and setMaxAge=0 as in the typical
example below but you should check on your own Domain and Path when a Cookie is
created, e.g. watch the Cookie headers in Firefox Firebug.

    // To delete a Cookie setMaxAge(0) and also any original domain and path if
specified.
    Cookie ck = new Cookie("JSESSIONID", null);
    //ck.setDomain("");
    ck.setPath(request.getContextPath());
    ck.setMaxAge(0);
    response.addCookie(ck);

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to