Bug 54102

Summary: new feature: automatic route detection
Product: Apache httpd-2 Reporter: inu
Component: mod_proxy_balancerAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: NEW ---    
Severity: enhancement CC: zl
Priority: P2 Keywords: PatchAvailable
Version: 2.5-HEAD   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: autoroute patch
second version of the autoroute patch

Description inu 2012-11-05 19:45:31 UTC
Created attachment 29551 [details]
autoroute patch

The same application server (like Weblogic) generate at every start a new random route-id. So no static route-id can used.
This patch adds the ability to read the route-id from a http-response field, and update the worker.

Example (weblogic):
  RequestHeader set X-WebLogic-Force-JVMID true
  ProxySet StickySession=JSESSIONID
  ProxySet AutoRoute=X-WebLogic-JVMID

@importer:
I have add same error-message, but i don't known, how to select the right number for it. So i have used the "99999" at both position. Please change it.

InuSasha

PS: in combination with patch in #53893, it is a minimal support of non-replication weblogic custer.
Comment 1 Zisis Lianas 2012-11-22 17:05:13 UTC
As workaround (or solution) you can use the following configuration:

  Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/"
  <Proxy balancer://appcluster>
    BalancerMember http://backend1.foo:7001 route=0
    BalancerMember http://backend2.foo:7001 route=1
    ProxySet lbmethod=bybusyness nofailover=off stickysession=ROUTEID
  </Proxy>


This configuration keeps the BALANCER_WORKER_ROUTE in a cookie called ROUTEID. So the stickyness is based on ROUTEID, an not JSESSIONID anymore. This works for session stickyness as well as session-failover scenarios.
Comment 2 inu 2012-11-22 17:18:07 UTC
Thanks Zisis,

actual we use the apache 2.2 with the apache-weblogic module.
But this module has same disadvantages, and does not support the Apache 2.4.
Additional we have more then one backend-cluster, so many additional cookies were needed.

So i wait for upload (and backport to 2.4).

Sascha
Comment 3 inu 2012-12-06 13:06:58 UTC
Created attachment 29719 [details]
second version of the autoroute patch

Hi,

i have work on an second version of this patch.
It supports now reading the route from set-cookie fields, environment variables or from the notes.

Sascha

PS: now i have found the log manual for developers ;)