You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2011/05/23 20:42:44 UTC

DO NOT REPLY [Bug 51247] New: Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

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: bugs@httpd.apache.org
        ReportedBy: kmashint@yahoo.com
    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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

--- Comment #14 from Keith Mashinter <km...@yahoo.com> ---
Created attachment 28769
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28769&action=edit
2.2.22 Win32 Release build to add Drain status to proxy balancer workers

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

William A. Rowe Jr. <wr...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|DUPLICATE                   |---

--- Comment #17 from William A. Rowe Jr. <wr...@apache.org> ---
Reopened to tag as fixed.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

--- Comment #6 from Keith Mashinter <km...@yahoo.com> 2011-08-21 15:55:54 UTC ---
A similar idea is in https://issues.apache.org/bugzilla/show_bug.cgi?id=48841 :
"mod_proxy only allows a BalancerMember's loadfactor to be set to a value
between 1 and 100.  Ideally, loadfactor should be allowed to be set to 0 so
that a BalancerMember can be removed from new traffic but allowed to keep
servicing existing sessions (i.e. bleeding off sessions) or to be able to start
a BalancerMember and test it before letting new traffic access it."

This is also a useful way to gracefully drop a reverse-proxy back-end server
from use.  Either one will do.  Would be good as a backport to 2.2 as well.

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

Keith Mashinter <km...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #9 from Keith Mashinter <km...@yahoo.com> 2011-09-20 11:34:27 UTC ---
This was resolved in the trunk for 2.4.x as
https://issues.apache.org/bugzilla/show_bug.cgi?id=48841.

*** This bug has been marked as a duplicate of bug 48841 ***

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

--- Comment #15 from William A. Rowe Jr. <wr...@apache.org> ---
Keith, I am deleting the binary attachments.  We have a quite strict policy of
only posting binaries on apache.org that come from committers to a project.
While we expect anyone applying patches from our issue trackers to carefully
vet and evaluate the suitability of patches for their own compilations, it is
not possible to do this effectively with binary blobs.

Moreso, the bug tracker is not an efficient distribution mechanism, please feel
free to post a link to your own site for users who might want to obtain this
feature in advance of a release, of course the onus is on them and as it isn't
hosted at the ASF, we disclaim any responsibility.

But please don't let this dampen your enthusiam, this is a long sought-after
feature and the contribution was great!

-- 
You are receiving this mail because:
You are the assignee for the bug.

DO NOT REPLY [Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

--- Comment #1 from Keith Mashinter <km...@yahoo.com> 2011-05-25 12:29:20 UTC ---
Created attachment 27060
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27060
mod_proxy_route_only_for_trunk.patch

This is a patch in theory only, since I'm still fighting to get the trunk to
compile, but wanted to share the intent and will replace once compiled.

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

Keith Mashinter <km...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #28765|mod_proxy_balancer_2_2_21-2 |mod_proxy_balancer_2_2_21_d
           filename|2_drain_win32.zip           |rain_win32.zip
  Attachment #28765|2.2.21-22 Win32 Release     |2.2.21 Win32 Release build
        description|build to add Drain status   |to add Drain status to
                   |to proxy balancer workers   |proxy balancer workers

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

Keith Mashinter <km...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #28765|Win32 Release build to add  |2.2.21-22 Win32 Release
        description|Drain status to proxy       |build to add Drain status
                   |balancer workers            |to proxy balancer workers

-- 
You are receiving this mail because:
You are the assignee for the bug.

DO NOT REPLY [Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

Keith Mashinter <km...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #27061|0                           |1
        is obsolete|                            |

--- Comment #3 from Keith Mashinter <km...@yahoo.com> 2011-05-27 01:13:54 UTC ---
Created attachment 27073
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27073
mod_proxy_route_only_for_2_2_19

Just making the constant forward compatible with the trunk for 2.3.x.

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

--- Comment #4 from Keith Mashinter <km...@yahoo.com> 2011-08-21 15:48:26 UTC ---
A similar idea is in https://issues.apache.org/bugzilla/show_bug.cgi?id=48841 :
"mod_proxy only allows a BalancerMember's loadfactor to be set to a value
between 1 and 100.  Ideally, loadfactor should be allowed to be set to 0 so
that a BalancerMember can be removed from new traffic but allowed to keep
servicing existing sessions (i.e. bleeding off sessions) or to be able to start
a BalancerMember and test it before letting new traffic access it."

This is also a useful way to gracefully drop a reverse-proxy back-end server
from use.

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

William A. Rowe Jr. <wr...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #18 from William A. Rowe Jr. <wr...@apache.org> ---
Fixed on trunk and 2.4.x.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

William A. Rowe Jr. <wr...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #28765|0                           |1
        is obsolete|                            |

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

William A. Rowe Jr. <wr...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #28769|0                           |1
        is obsolete|                            |

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cameron.stokes@ihg.com

--- Comment #19 from Sebb <se...@apache.org> ---
*** Bug 48841 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

--- Comment #12 from Keith Mashinter <km...@yahoo.com> ---
I checked against the Apache 2.2.22 release and the backport of the Drain
status from 2.3/2.4 to Apache-2.2 should work for 2.2.22 as well as 2.2.21
since there were no competing changes.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

--- Comment #13 from Keith Mashinter <km...@yahoo.com> ---
Created attachment 28765
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28765&action=edit
Win32 Release build to add Drain status to proxy balancer workers

-- 
You are receiving this mail because:
You are the assignee for the bug.

DO NOT REPLY [Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

--- Comment #5 from Keith Mashinter <km...@yahoo.com> 2011-08-21 15:54:26 UTC ---
A similar idea is in https://issues.apache.org/bugzilla/show_bug.cgi?id=48841 :
"mod_proxy only allows a BalancerMember's loadfactor to be set to a value
between 1 and 100.  Ideally, loadfactor should be allowed to be set to 0 so
that a BalancerMember can be removed from new traffic but allowed to keep
servicing existing sessions (i.e. bleeding off sessions) or to be able to start
a BalancerMember and test it before letting new traffic access it."

This is also a useful way to gracefully drop a reverse-proxy back-end server
from use.

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

Keith Mashinter <km...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |https://docs.google.com/ope
                   |                            |n?id=0B5zLg35jBZLTMFN3c2JBc
                   |                            |014RVU

--- Comment #16 from Keith Mashinter <km...@yahoo.com> ---
Understood that ASF doesn't want the security and other overhead of dealing
with binary files in Bugzilla.

I've provided a URL, also below, to download the backport of the proxy
balancer/worker Drain status to Apache 2.2.21 and .22.

https://docs.google.com/open?id=0B5zLg35jBZLTMFN3c2JBc014RVU

-- 
You are receiving this mail because:
You are the assignee for the bug.

DO NOT REPLY [Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

--- Comment #10 from Keith Mashinter <km...@yahoo.com> 2011-09-25 18:03:58 UTC ---
Created attachment 27585
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27585
Backport of this idea adopted as a Drain status from 2.3/2.4 to Apache-2.2

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

Keith Mashinter <km...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Platform|PC                          |All

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

--- Comment #7 from Keith Mashinter <km...@yahoo.com> 2011-09-20 01:39:25 UTC ---
Related to https://issues.apache.org/bugzilla/show_bug.cgi?id=48841 where that
allows the magic/special value of lbfactor=0 to support the same idea, taking
that server out of the balancer for new sessions but still allowing sticky
sessions/routes through.  The other has the advantage of not requiring a new
status and reusing the lbfactor, but complicates the lbfactor calculations to
ensure they deal with divide-by-zero.

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

Keith Mashinter <km...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #27047|0                           |1
        is obsolete|                            |

--- Comment #2 from Keith Mashinter <km...@yahoo.com> 2011-05-25 12:53:18 UTC ---
Created attachment 27061
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27061
mod_proxy_route_only_for_2_2_19.patch

Re-attach patch for 2.2.19 marking it specifically as a patch.

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

--- Comment #8 from Keith Mashinter <km...@yahoo.com> 2011-09-20 11:26:03 UTC ---
Created attachment 27542
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27542
mod_proxy_route_only_for_2_2_21.patch

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

--- Comment #11 from Keith Mashinter <km...@yahoo.com> 2011-10-13 02:21:41 UTC ---
Also note the difference with this and 48841 as compared to the "Route
Redirect" functionality is that the "Route Redirect" only redirects existing
routes but allows new sessions to be balanced/elected on the server intended to
be redirected.

The "Drain" change happens such that ONLY a defined route will make it to the
server, and it will never be balanced/elected for requests without its defined
route.  This cleanly supports phasing a server completely out of use when all
its sessions have ended.

I'll try to keep up with the backport as new 2.2.x versions come out, but it
would be nice to include in a futre 2.2.x version.

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 51247] Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51247

Keith Mashinter <km...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|2.2.17                      |2.2.19

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org