ASF Bugzilla – Attachment 18468 Details for
Bug 39806
Add env vars to mod_proxy_balancer to allow more control
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
mod_proxy_balancer-trunk.patch
mod_proxy_balancer-trunk.patch (text/plain), 3.58 KB, created by
Brian
on 2006-06-14 19:16:43 UTC
(
hide
)
Description:
mod_proxy_balancer-trunk.patch
Filename:
MIME Type:
Creator:
Brian
Created:
2006-06-14 19:16:43 UTC
Size:
3.58 KB
patch
obsolete
>diff -ru trunk.orig/docs/manual/mod/mod_proxy_balancer.xml trunk/docs/manual/mod/mod_proxy_balancer.xml >--- trunk.orig/docs/manual/mod/mod_proxy_balancer.xml 2006-06-14 13:51:57.000000000 -0400 >+++ trunk/docs/manual/mod/mod_proxy_balancer.xml 2006-06-14 15:16:35.000000000 -0400 >@@ -271,6 +271,47 @@ > > </section> > >+<section id="environment"> >+ <title>Exported Environment Variables</title> >+ <p>At present there are 5 environment variables exported:</p> >+ >+ <!-- ============= BALANCER_SESSION_STICKY =============== --> >+ <dt><var><a name="balancer_session_sticky" id="balancer_session_sticky">BALANCER_SESSION_STICKY</a></var></dt> >+ <dd> >+ <p>This is assigned the <var>stickysession</var> value used in the current >+ request. It is the cookie or parameter name used for sticky sessions</p> >+ </dd> >+ >+ <!-- ============= BALANCER_SESSION_ROUTE ================ --> >+ <dt><var><a name="balancer_session_route" id="balancer_session_route">BALANCER_SESSION_ROUTE</a></var></dt> >+ <dd> >+ <p>This is assigned the <var>route</var> parsed from the current >+ request.</p> >+ </dd> >+ >+ <!-- ============= BALANCER_NAME ========================= --> >+ <dt><var><a name="balancer_name" id="balancer_name">BALANCER_NAME</a></var></dt> >+ <dd> >+ <p>This is assigned the name of the balancer used for the current >+ request. The value is something like <code>balancer://foo</code>.</p> >+ </dd> >+ >+ <!-- ============= BALANCER_WORKER_NAME ================== --> >+ <dt><var><a name="balancer_worker_name" id="balancer_worker_name">BALANCER_WORKER_NAME</a></var></dt> >+ <dd> >+ <p>This is assigned the name of the worker used for the current request. >+ The value is something like <code>http://hostA:1234</code>.</p> >+ </dd> >+ >+ <!-- ============= BALANCER_WORKER_ROUTE ================= --> >+ <dt><var><a name="balancer_worker_route" id="balancer_worker_route">BALANCER_WORKER_ROUTE</a></var></dt> >+ <dd> >+ <p>This is assigned the <var>route</var> of the worker that will be >+ used for the current request.</p> >+ </dd> >+ >+</section> >+ > <section id="enable"> > <title>Enabling Balancer Manager Support</title> > <p>This module <em>requires</em> the service of >diff -ru trunk.orig/modules/proxy/mod_proxy_balancer.c trunk/modules/proxy/mod_proxy_balancer.c >--- trunk.orig/modules/proxy/mod_proxy_balancer.c 2006-06-14 13:52:23.000000000 -0400 >+++ trunk/modules/proxy/mod_proxy_balancer.c 2006-06-14 15:10:33.000000000 -0400 >@@ -389,6 +389,14 @@ > *worker = runtime; > } > >+ /* Add balancer/worker info to env. */ >+ apr_table_setn(r->subprocess_env, >+ "BALANCER_NAME", (*balancer)->name); >+ apr_table_setn(r->subprocess_env, >+ "BALANCER_WORKER_NAME", (*worker)->name); >+ apr_table_setn(r->subprocess_env, >+ "BALANCER_WORKER_ROUTE", (*worker)->s->route); >+ > /* Rewrite the url from 'balancer://url' > * to the 'worker_scheme://worker_hostname[:worker_port]/url' > * This replaces the balancers fictional name with the >@@ -399,6 +407,12 @@ > if (route) { > apr_table_setn(r->notes, "session-sticky", (*balancer)->sticky); > apr_table_setn(r->notes, "session-route", route); >+ >+ /* Add session info to env. */ >+ apr_table_setn(r->subprocess_env, >+ "BALANCER_SESSION_STICKY", (*balancer)->sticky); >+ apr_table_setn(r->subprocess_env, >+ "BALANCER_SESSION_ROUTE", route); > } > ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, > "proxy: BALANCER (%s) worker (%s) rewritten to %s",
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 39806
:
18457
|
18467
| 18468