or remote port can be logged. PR 43415. [Adam Hasselbalch Hansen
<ahh@one.com>, Ruediger Pluem, Jeff Trawick]
+ *) Added 'disablereuse' option for ProxyPass which, essentially,
+ disables connection pooling for the backend servers.
+ [Jim Jagielski]
+
*) mod_speling: remove regression from 1.3/2.0 behavior and
drop dependency between mod_speling and AcceptPathInfo.
PR 43562 [Jose Kahan <jose w3.org>]
Trunk version works
+1: fielding, rpluem, niq
- * mod_proxy: Add in 'disablereuse' option for parity with similar
- mod_jk functionality.
- Trunk version of patch:
- http://svn.apache.org/viewvc?view=rev&revision=627728
- Backport version for 2.2.x of patch:
- http://people.apache.org/~jim/patches/proxy-disablereuse-v2.txt
- +1: jim, rpluem
- niq: +1 with the proviso that there's still a typo in the docs in
- proxy-disablereuse-v2.txt. But it's fixed in r655986.
-
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
in the pool the Apache will return <code>SERVER_BUSY</code> status to
the client.
</td></tr>
+ <tr><td>disablereuse</td>
+ <td>Off</td>
+ <td>This parameter should be used when you want to force mod_proxy
+ to immediately close a connection to the backend after being used, and
+ thus, disable its persistent connection and pool for that backend.
+ This helps in various situations where a firewall between Apache and
+ the backend server (regardless of protocol) tends to silently
+ drop connections or when backends themselves may be under round-
+ robin DNS. To prevent mod_proxy from reusing the backend connection,
+ set this property value to <code>On</code>.
+ </td></tr>
<tr><td>flushpackets</td>
<td>off</td>
<td>Determines whether the proxy module will auto-flush the output
* 20051115.9 (2.2.7) Add ap_send_interim_response API
* 20051115.10(2.2.7) Added ap_mod_status_reqtail (minor)
* 20051115.11(2.2.7) Add *ftp_directory_charset to proxy_dir_conf
- * 20051115.12(2.2.8) Add optional function ap_logio_add_bytes_in() to mog_logio
+ * 20051115.12(2.2.8) Add optional function ap_logio_add_bytes_in() to mog_logio
+ * 20051115.13(2.2.9) Add disablereuse and disablereuse_set
+ * to proxy_worker struct (minor)
*
*/
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20051115
#endif
-#define MODULE_MAGIC_NUMBER_MINOR 12 /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 13 /* 0...n */
/**
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a
return "KeepAlive must be On|Off";
worker->keepalive_set = 1;
}
+ else if (!strcasecmp(key, "disablereuse")) {
+ if (!strcasecmp(val, "on"))
+ worker->disablereuse = 1;
+ else if (!strcasecmp(val, "off"))
+ worker->disablereuse = 0;
+ else
+ return "DisableReuse must be On|Off";
+ worker->disablereuse_set = 1;
+ }
else if (!strcasecmp(key, "route")) {
/* Worker route.
*/
apr_interval_time_t ping_timeout;
char ping_timeout_set;
char retry_set;
+ char disablereuse;
+ char disablereuse_set;
};
/*
#endif
/* determine if the connection need to be closed */
- if (conn->close_on_recycle || conn->close) {
+ if (conn->close_on_recycle || conn->close || worker->disablereuse ||
+ !worker->is_address_reusable) {
apr_pool_t *p = conn->pool;
apr_pool_clear(conn->pool);
memset(conn, 0, sizeof(proxy_conn_rec));
if (!worker->retry_set) {
worker->retry = apr_time_from_sec(PROXY_WORKER_DEFAULT_RETRY);
}
- /* By default address is reusable */
- worker->is_address_reusable = 1;
+ /* By default address is reusable unless DisableReuse is set */
+ if (worker->disablereuse) {
+ worker->is_address_reusable = 0;
+ }
+ else {
+ worker->is_address_reusable = 1;
+ }
#if APR_HAS_THREADS
ap_mpm_query(AP_MPMQ_MAX_THREADS, &mpm_threads);
*
* TODO: Handle this much better...
*/
- if (!conn->hostname || !worker->is_address_reusable ||
+ if (!conn->hostname || !worker->is_address_reusable ||
+ worker->disablereuse ||
(r->connection->keepalives &&
(r->proxyreq == PROXYREQ_PROXY || r->proxyreq == PROXYREQ_REVERSE) &&
(strcasecmp(conn->hostname, uri->hostname) != 0) ) ) {