Commit Graph

76 Commits

Author SHA1 Message Date
ceeb8b0403 standard method
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@774428 13f79535-47bb-0310-9956-ffa450edef68
2009-05-13 16:56:12 +00:00
48ae3d9efa Allow the load balancing method to "create" workers.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@774400 13f79535-47bb-0310-9956-ffa450edef68
2009-05-13 15:27:05 +00:00
a970341df7 Arrange the proxy_balancer_method:
- Put context back after the finder().
- Use  server_rec as second parameter for reset() and age().
- Add the call for reset().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@773929 13f79535-47bb-0310-9956-ffa450edef68
2009-05-12 15:10:56 +00:00
39c14c3bec update comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@772279 13f79535-47bb-0310-9956-ffa450edef68
2009-05-06 14:32:46 +00:00
a29e9ec1d5 Change the order of mod_proxy and mod_proxy_balancer child_init().
Change the balancer workers area to the address of workers instead copying the workers.
Arrange lbmethod accordingly.
Move the creation of conf->forward worker to mod_proxy child_init().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@771940 13f79535-47bb-0310-9956-ffa450edef68
2009-05-05 17:15:48 +00:00
a3c2a975c9 * Try first if we find any "recoverable" workers before we force them to
recover.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@734710 13f79535-47bb-0310-9956-ffa450edef68
2009-01-15 13:59:11 +00:00
653ac709cc All lbmethods are now ind submodules...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@722952 13f79535-47bb-0310-9956-ffa450edef68
2008-12-03 16:08:26 +00:00
45c5291a7f Allow determination of whether to use ';' as
a sticky session path delim/sep (ala mod_jk) to
be runtime (and balancer-wise) configurable.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@687754 13f79535-47bb-0310-9956-ffa450edef68
2008-08-21 13:33:32 +00:00
383a1d2cd1 Add in additional logging and use correct formats
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@687099 13f79535-47bb-0310-9956-ffa450edef68
2008-08-19 17:28:00 +00:00
5d8e4bba70 Remove trailing path element, ala ./jk/native/common/jk_lb_worker.c,
but use apr_strtok niceness. PR: 45158


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@686809 13f79535-47bb-0310-9956-ffa450edef68
2008-08-18 16:10:41 +00:00
1a0a3b549c Add in bybusyness LB method, via Joel Gluth in
https://issues.apache.org/bugzilla/show_bug.cgi?id=45501

NOTE: Name changed and added in to ease enhancement/bugfixes


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@686805 13f79535-47bb-0310-9956-ffa450edef68
2008-08-18 15:59:48 +00:00
fef506ed1a * Move nonce field inside the html form.
PR: 45578


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@683373 13f79535-47bb-0310-9956-ffa450edef68
2008-08-06 19:02:34 +00:00
ce75fb285c No functional change; simplify the CVE-2007-6420 fix slightly, as
suggested by rpluem:

* modules/proxy/mod_proxy_balancer.c (balancer_init): Serialize the
  UUID to a string here...
  (balancer_handler): ...rather than here.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@663967 13f79535-47bb-0310-9956-ffa450edef68
2008-06-06 14:44:35 +00:00
4a375eff22 Prevent CSRF attacks against the balancer-manager (CVE-2007-6420)
* modules/proxy/mod_proxy_balancer.c (balancer_init): New function.
  (balancer_handler): Place a nonce in the form output, and check that
  the submitted form data includes that nonce.
  (ap_proxy_balancer_register_hook): Register the new post_config hook.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@661666 13f79535-47bb-0310-9956-ffa450edef68
2008-05-30 11:49:31 +00:00
6e450bc660 * Set at init time and combine comments.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@661459 13f79535-47bb-0310-9956-ffa450edef68
2008-05-29 20:12:58 +00:00
c3242b9c5c * Do not add the query string again in the case that we are using the
unparsed uri.

PR: 44803


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@661452 13f79535-47bb-0310-9956-ffa450edef68
2008-05-29 19:53:30 +00:00
a324a1d72f Remove all references to CORE_PRIVATE.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645455 13f79535-47bb-0310-9956-ffa450edef68
2008-04-07 10:45:43 +00:00
6062378f7c * Correctly escape the worker route and the worker redirect string in the HTML
output of the balancer manager.

Reported by SecurityReason.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@607275 13f79535-47bb-0310-9956-ffa450edef68
2007-12-28 15:57:36 +00:00
d80bc134c9 * Prevent crash in balancer manager if invalid balancer name is passed as
parameter.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@607273 13f79535-47bb-0310-9956-ffa450edef68
2007-12-28 15:53:45 +00:00
b514669c7a * Set character set for HTML outputs generated by mod_ldap,
mod_proxy_balancer, mod_proxy_ftp, mod_info, mod_dav without a character
  set to ISO-8859-1.

Submitted by: jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@606693 13f79535-47bb-0310-9956-ffa450edef68
2007-12-24 11:45:22 +00:00
4df56cc5aa * Remove unneeded include of unistd.h. getpid is not used any longer since
r394065.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@599326 13f79535-47bb-0310-9956-ffa450edef68
2007-11-29 08:18:31 +00:00
60bda3ec81 These really are block specific, so why not
make them as such :)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@575712 13f79535-47bb-0310-9956-ffa450edef68
2007-09-14 14:57:56 +00:00
5579888fa5 * Do not reset lbstatus, lbfactor and lbset if the shared proxy_worker_stat
structure for a worker is already initialized by the same or another
  process.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@574485 13f79535-47bb-0310-9956-ffa450edef68
2007-09-11 06:38:16 +00:00
42bb0116dd as not everyone needs sticky sessions - avoid segfault in balancer manager and
mod_status


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@572832 13f79535-47bb-0310-9956-ffa450edef68
2007-09-04 23:09:24 +00:00
7306af0a70 Return 503 only if the route matches some of the balancer members and nofailover=On is specified.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@556931 13f79535-47bb-0310-9956-ffa450edef68
2007-07-17 14:31:05 +00:00
e7a75e4f3e Fill notes "session-sticky" and subprocess_env "BALANCER_SESSION_STICKY"
correctly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@554892 13f79535-47bb-0310-9956-ffa450edef68
2007-07-10 09:53:36 +00:00
3fe0224692 Don't display "PHPSESSIONID | PHPSESSIONID" but only
"PHPSESSIONID".


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@551126 13f79535-47bb-0310-9956-ffa450edef68
2007-06-27 11:39:03 +00:00
9e567f96de Remove the balancer modification logic of balancer-manager
because it can't work. And add the sticky_path to the
sticky display.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@551099 13f79535-47bb-0310-9956-ffa450edef68
2007-06-27 08:42:02 +00:00
4dee811cb9 Add sticky_path to solve PR41897.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@550519 13f79535-47bb-0310-9956-ffa450edef68
2007-06-25 14:42:25 +00:00
94743e8f7b * Preset the form fields for route and redirect with the values of the active
configuration in the scoreboard and not with the ones loaded from the
  configuration files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@544930 13f79535-47bb-0310-9956-ffa450edef68
2007-06-06 20:02:56 +00:00
bf5a6bc8e5 Fix compile warning:
mod_proxy_balancer.c:537: warning: unused variable 'rv'



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@484794 13f79535-47bb-0310-9956-ffa450edef68
2006-12-08 21:38:40 +00:00
3b5d5bf319 Failure to unlock is very nasty, so log it to help
with troubleshooting.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@484792 13f79535-47bb-0310-9956-ffa450edef68
2006-12-08 21:37:08 +00:00
ba2a767fe6 We are doing nothing here... but keep the stubs
in case we ever do.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@484789 13f79535-47bb-0310-9956-ffa450edef68
2006-12-08 21:29:20 +00:00
792dfe200b Log when the lock fails.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@484787 13f79535-47bb-0310-9956-ffa450edef68
2006-12-08 21:26:40 +00:00
83a044b23a No need for each ind lb method to increment the elected
element. Do so from the main calling func.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@484783 13f79535-47bb-0310-9956-ffa450edef68
2006-12-08 21:13:01 +00:00
f80b020c74 Add force recovery for balancer.
In case all balancer members were in error state 503
was returned until the recovery timeout expired.
The patch forces recovery in case all balancer members
are in error state regardless of recovery timeout
directive.
This fixes the time gap when 503 was returned and
backend was already up and running.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@451572 13f79535-47bb-0310-9956-ffa450edef68
2006-09-30 10:18:48 +00:00
483ddc121a * Set the new environment variable BALANCER_ROUTE_CHANGED if a worker with a
route different from the one supplied by the client had been chosen or if
  the client supplied no routing information for a balancer with sticky
  sessions.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@446929 13f79535-47bb-0310-9956-ffa450edef68
2006-09-16 19:49:41 +00:00
743a621e8d Replace ap_get_server_version with ap_get_server_banner() and
ap_get_server_description().

High-level summary:

The full server version information is now included in the error log at
startup as well as server status reports, irrespective of the setting
of the ServerTokens directive.

Third-party modules must now use ap_get_server_banner() or 
ap_get_server_description() in place of ap_get_server_version().



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@440337 13f79535-47bb-0310-9956-ffa450edef68
2006-09-05 13:08:15 +00:00
3397848717 * Extract stickysession information correctly in the case that it is given
as parameter like in the following example:

  www.someplace.com/somewhere/?jsessionid=gggfgdufdfoef.server&parameter=value

  So far we were only able to handle stickysession information encoded in the
  following form:

  www.someplace.com/somewhere/;jsessionid=gggfgdufdfoef.server?parameter=value

PR: 40400


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@440160 13f79535-47bb-0310-9956-ffa450edef68
2006-09-04 19:51:52 +00:00
3eeb5a123b Initialization change. Move to a different format
to force resets as well as a common technique, in case
_route is updated at some point.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@428361 13f79535-47bb-0310-9956-ffa450edef68
2006-08-03 11:41:14 +00:00
585f146b66 Reset standby flags for each loop through the cluster sets
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@428352 13f79535-47bb-0310-9956-ffa450edef68
2006-08-03 11:30:11 +00:00
dc9255aabe Good catch by Ruediger
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@427368 13f79535-47bb-0310-9956-ffa450edef68
2006-07-31 23:46:55 +00:00
61a56451a3 Add in a very simple balancer "set" concept, which allows
for members to be assigned to a particular cluster set
such that members in lower-numbered sets are checked/used
before those in higher ones.

Also bundled in this are some HTML cleanups for the balancer
manager UI. Sorry for the mixins :)

Compiles/builds clean: passes test framework as well
as more normal usage tests ;)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@427172 13f79535-47bb-0310-9956-ffa450edef68
2006-07-31 17:01:40 +00:00
ae24222e23 The number of times elected as well as the i/o
of the workers is useful info to show in the
manager.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@421287 13f79535-47bb-0310-9956-ffa450edef68
2006-07-12 15:13:22 +00:00
3e2c97f512 It never fails. I sit on a patch for awhile and
it's not until almost right after I commit it that
I think "hey, there's a better way to do that."
Anyway, I was never happy about the code
duplication of the primary/standby checks...
This fixes that.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@421283 13f79535-47bb-0310-9956-ffa450edef68
2006-07-12 15:01:15 +00:00
0b80babf0b Add in hot-standby balancer member. If all other members
are disabled or not-usable, ONLY THEN will the hot
standby's be used.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420986 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:39:38 +00:00
de659cbed0 update license header text
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:33:53 +00:00
92a185a104 Restructure the find_route_worker() function. Basically,
it should take care of knowing about usable and unusable
workers. By centralizing this logic, it will make it
easier and more streamlined to add in the forthcoming
hot-standby status workers.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420936 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 17:51:54 +00:00
c99bff74f3 * Retry worker chosen by client supplied route / redirect worker if it
is in error state before sending "Service Temporarily Unavailable".

PR: 38962
Submitted by: Christian Boitel <cboitel lfdj.com>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@417443 13f79535-47bb-0310-9956-ffa450edef68
2006-06-27 12:05:43 +00:00
58f86ac058 * Add the following environment variables to expose the information
* about
  the route, the sticky session and the worker used during a request to
  other modules:

  BALANCER_SESSION_STICKY
  BALANCER_SESSION_ROUTE
  BALANCER_NAME
  BALANCER_WORKER_NAME
  BALANCER_WORKER_ROUTE

PR: 39806
Submitted by: Brian <brectanu gmail.com>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@417238 13f79535-47bb-0310-9956-ffa450edef68
2006-06-26 16:59:38 +00:00