Bug 54102 - new feature: automatic route detection
Summary: new feature: automatic route detection
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy_balancer (show other bugs)
Version: 2.5-HEAD
Hardware: PC Linux
: P2 enhancement with 2 votes (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2012-11-05 19:45 UTC by inu
Modified: 2012-12-06 13:06 UTC (History)
1 user (show)



Attachments
autoroute patch (9.12 KB, patch)
2012-11-05 19:45 UTC, inu
Details | Diff
second version of the autoroute patch (20.63 KB, patch)
2012-12-06 13:06 UTC, inu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 ;)