1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-08 04:22:21 +03:00
Commit Graph

1417 Commits

Author SHA1 Message Date
Jim Jagielski
aac783bdf5 No longer depend on how fork() works when laying out segments...
function pointers in shm are... nasty ;)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1072098 13f79535-47bb-0310-9956-ffa450edef68
2011-02-18 18:40:25 +00:00
Stefan Fritsch
385da96d50 Use ap_state_query() to fix many modules that were not correctly initializing
if they were not active during server startup but got enabled later during a
graceful restart (in which case they need to do all work during a single
config run).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1070153 13f79535-47bb-0310-9956-ffa450edef68
2011-02-12 21:23:56 +00:00
Ruediger Pluem
91960c0b37 * Play safe if the notes table does not contain an SSL_connect_rv key.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1069785 13f79535-47bb-0310-9956-ffa450edef68
2011-02-11 12:50:31 +00:00
Jim Jagielski
1d0800cd28 move function...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1069381 13f79535-47bb-0310-9956-ffa450edef68
2011-02-10 13:29:53 +00:00
Jim Jagielski
f67eea94fb Ugg... unbalanced workers *do* need a mutex as well (good catch Rüdiger!)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1068879 13f79535-47bb-0310-9956-ffa450edef68
2011-02-09 13:20:09 +00:00
Jim Jagielski
efc583f6e7 typo
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1068873 13f79535-47bb-0310-9956-ffa450edef68
2011-02-09 13:00:00 +00:00
Jim Jagielski
03ab1d60ca Squash error/warning about signed/unsigned comparison
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1068871 13f79535-47bb-0310-9956-ffa450edef68
2011-02-09 12:56:01 +00:00
Jim Jagielski
84a5c9cd6f Remove the thread mutex from the worker... it really should be
in the balancer. Thus we have global and thread for the balancer.
Use global when updating the full, shm list of workers; use
thread when being local.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1068581 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 21:08:10 +00:00
Jim Jagielski
f863547c32 Expose this as part of the API. That way, other code/modules
which want to overload mod_proxy's trans phase can use it to
handle ProxyPass as well, without requiring monkeying
with conf->aliases...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1068400 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 13:59:36 +00:00
Jim Jagielski
68dcb0f789 Keep track of how many workers we've used so far... no need
to provide field to add another if no slots exist.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1068020 13f79535-47bb-0310-9956-ffa450edef68
2011-02-07 17:15:04 +00:00
Jim Jagielski
96af650c42 Mutex around adding a new worker...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1067965 13f79535-47bb-0310-9956-ffa450edef68
2011-02-07 15:25:09 +00:00
Jim Jagielski
2752756dd8 Lock around the time when we're mucking w/ balancers...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1067276 13f79535-47bb-0310-9956-ffa450edef68
2011-02-04 20:34:47 +00:00
Jim Jagielski
55b9f8fba8 Here we go... we can now, via balancer-manager, add new
workers to existing balancers. Still work to be done,
like error checking that we aren't trying to add more
than we can (right now, it fails, but it would be nice
to handle it nicer), disabling and *deleting* workers
we don't want anymore, the actual drain method, etc...
but this is some major goodness.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1067269 13f79535-47bb-0310-9956-ffa450edef68
2011-02-04 20:01:04 +00:00
Jim Jagielski
85ac025790 might as well allow for the sticky session to be adjusted as well...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1067206 13f79535-47bb-0310-9956-ffa450edef68
2011-02-04 16:11:15 +00:00
Jim Jagielski
b32f5a5a09 Oops.... we need to adjust sticky, which is an array now
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1067205 13f79535-47bb-0310-9956-ffa450edef68
2011-02-04 16:11:12 +00:00
Jim Jagielski
b32eb3a6af And yet more balancer params that can be changed at runtime via
the b-m application...

next up, of course, is adding new workers ;)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1067178 13f79535-47bb-0310-9956-ffa450edef68
2011-02-04 13:50:39 +00:00
Jim Jagielski
42f76d8265 No need to pollute the whole namespace...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1066631 13f79535-47bb-0310-9956-ffa450edef68
2011-02-02 21:25:34 +00:00
Jim Jagielski
ee5eda1b71 Optimize... create a struct to hold the worker status info
(need to align w/ set_params later on) and note when we
update timestamps

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1066607 13f79535-47bb-0310-9956-ffa450edef68
2011-02-02 20:17:22 +00:00
Jim Jagielski
57a654ffe7 Instead of just enabling/disabling, we can now adjust
more useful worker status bits, such as whether hot stby, etc...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1066482 13f79535-47bb-0310-9956-ffa450edef68
2011-02-02 14:39:48 +00:00
Jim Jagielski
f2c6805bc9 Again, abstract out the worker status magic to it's handled
by funcs...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1066138 13f79535-47bb-0310-9956-ffa450edef68
2011-02-01 19:07:02 +00:00
Jim Jagielski
19a1fc4170 bitfields should be unsigned
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1066112 13f79535-47bb-0310-9956-ffa450edef68
2011-02-01 18:14:37 +00:00
Jim Jagielski
6c0a4fc5da Move the setting of flags into a func... that way there is
one place to maintain as the number of flags grow...

Since we are using just the bits, make unsigned.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1066110 13f79535-47bb-0310-9956-ffa450edef68
2011-02-01 18:13:15 +00:00
Jim Jagielski
3866ae89a4 We can now change lbmethod at runtime.
Provide a stub for other balancer-related params to
be adjusted as well, like timeout, sticky, etc...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1066076 13f79535-47bb-0310-9956-ffa450edef68
2011-02-01 16:00:01 +00:00
Jim Jagielski
177e4e5f86 Move the lbmethod to also allow it to be adjusted runtime
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1065750 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 20:29:01 +00:00
Jim Jagielski
7b07c3822e tuck away code that lets us ensure that the id is always
"unique"

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1065749 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 20:28:57 +00:00
Jim Jagielski
12ae415dbe Move some "nice to be able to change" balancer stuff to shm
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1065748 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 20:28:52 +00:00
Jim Jagielski
334ae2f5a2 Make it clear that '_' is a possible char and accepted
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060802 13f79535-47bb-0310-9956-ffa450edef68
2011-01-19 13:08:08 +00:00
Igor Galić
ceb1766d2d Add a patch from Vincent Deffontaines to make the adding of X-forwarded-*
headers configurable: ProxyAddHeaders, defaulting to 'On'.
http://www.mail-archive.com/dev@httpd.apache.org/msg49971.html


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060795 13f79535-47bb-0310-9956-ffa450edef68
2011-01-19 12:48:17 +00:00
Jim Jagielski
a713db09d4 Make the balancer shared memory slot more human readable. But we need
to make it a "safe" filename, so create 2 funcs which do that.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060657 13f79535-47bb-0310-9956-ffa450edef68
2011-01-19 02:41:49 +00:00
Rainer Jung
1a1c15a417 Align proxy_worker_shared in slotmem shm
using default APR alignment.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060112 13f79535-47bb-0310-9956-ffa450edef68
2011-01-17 22:16:51 +00:00
Rainer Jung
5e981d902a mod_slotmem_shm is a predecessor of
mod_proxy_balancer, not mod_proxy.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060109 13f79535-47bb-0310-9956-ffa450edef68
2011-01-17 22:09:18 +00:00
Jim Jagielski
283b511ebd Display number of members possible per balancer
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058795 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 23:25:48 +00:00
Jim Jagielski
a541e41dab And check the nonce, taking care to ensure that the
form actually specified a balancer.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058630 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:59:25 +00:00
Jim Jagielski
31c4a9e21e Move nonce to balancer struct and add logic for nonce and growth.
Adjust mmn and update doccos

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058629 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:59:22 +00:00
Jim Jagielski
68704e1435 Set some defaults... do it here @ worker creation, not initialization
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058627 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:59:13 +00:00
Jim Jagielski
ddebc67a4e whitespace
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058626 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:59:10 +00:00
Jim Jagielski
fab3678ad3 Builds and passes tests as prefork... good save state
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058625 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:59:05 +00:00
Jim Jagielski
9096c04779 Adjust for conf->workers being *proxy_worker and balancer->workers being **proxy_worker
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058624 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:59:02 +00:00
Jim Jagielski
201bbd1ba9 More movement to shared stuff...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058623 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:58:57 +00:00
Jim Jagielski
daa5a5c57c OK... a good commit point (we don't quite compile yet though...)
Pull out the worker scoreboard cruft and start moving most
worker stuff to shm. Use slotmem for workers and provide
space for growth.

Redo logic:

  ap_proxy_define_*
  ap_proxy_create_*
  ap_proxy_initialize_*

Right now just for workers, but lay framework for balancers
as well. The idea is to break out the functional parts
to make it easy for dynamics. Defining is simply describing
the worker, and tucking that info away. When we create, we
go ahead and create the shared memory, etc... Initialize
is simply to allow child process to access the shm...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058622 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:58:50 +00:00
Jim Jagielski
5febbb22aa Use branch now
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058621 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:58:45 +00:00
Ruediger Pluem
b628c7f630 * Be ANSI C compatible
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1055771 13f79535-47bb-0310-9956-ffa450edef68
2011-01-06 07:24:22 +00:00
Jeff Trawick
62740bfdee fix comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1055605 13f79535-47bb-0310-9956-ffa450edef68
2011-01-05 19:47:45 +00:00
Jim Jagielski
b65d51455a update comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1055570 13f79535-47bb-0310-9956-ffa450edef68
2011-01-05 18:33:45 +00:00
Graham Leggett
9e215e4840 Make sure we clone the table rather than copy it, to ensure that no keys
or values allocated from r->pool end up referenced in the backend request.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1055386 13f79535-47bb-0310-9956-ffa450edef68
2011-01-05 09:53:55 +00:00
Graham Leggett
40a2f60a99 Update the comment to indicate what the backend request is really used for.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1055367 13f79535-47bb-0310-9956-ffa450edef68
2011-01-05 09:18:18 +00:00
Graham Leggett
e0cf3c996e mod_proxy_http: Allocate the fake backend request from a child pool
of the backend connection, instead of misusing the pool of the frontend
request. Fixes a thread safety issue where buckets set aside in the
backend connection leak into other threads, and then disappear when
the frontend request is cleaned up, in turn causing corrupted buckets
to make other threads spin.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1055250 13f79535-47bb-0310-9956-ffa450edef68
2011-01-05 00:23:43 +00:00
Graham Leggett
b7e70e242d mod_proxy_http: Ensure that when the backend is closed, the final call to
ap_proxy_http_cleanup() is suppressed, so that the backend is not cleaned
twice. Fixes a further thread safety issue.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1055246 13f79535-47bb-0310-9956-ffa450edef68
2011-01-04 23:55:50 +00:00
Graham Leggett
4275788f59 Change another variable that could be confused for conn_rec.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053967 13f79535-47bb-0310-9956-ffa450edef68
2010-12-30 18:32:15 +00:00
Graham Leggett
4a8f0cdfbc Fix a spin should we encounter a corrupt bucket from the proxy.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053966 13f79535-47bb-0310-9956-ffa450edef68
2010-12-30 18:28:26 +00:00