mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
Document the removal of the flushing bandaid to a
runtime param. Since other protocols might benefit from this, remove the ajp_ prefixes, to make it more generic looking. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@390210 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
4
CHANGES
4
CHANGES
@@ -2,6 +2,10 @@
|
|||||||
Changes with Apache 2.3.0
|
Changes with Apache 2.3.0
|
||||||
[Remove entries to the current 2.0 and 2.2 section below, when backported]
|
[Remove entries to the current 2.0 and 2.2 section below, when backported]
|
||||||
|
|
||||||
|
*) mod_proxy_ajp: Flushing of the output after each AJP chunk is now
|
||||||
|
configurable at runtime via the 'flushpackets' and 'flushwait' worker
|
||||||
|
params. [Jim Jagielski]
|
||||||
|
|
||||||
*) mod_proxy_http: Do send keep-alive header if the client sent
|
*) mod_proxy_http: Do send keep-alive header if the client sent
|
||||||
connection: keep-alive and do not close backend connection if the client
|
connection: keep-alive and do not close backend connection if the client
|
||||||
sent connection: close. PR 38524. [Ruediger Pluem, Joe Orton]
|
sent connection: close. PR 38524. [Ruediger Pluem, Joe Orton]
|
||||||
|
@@ -117,6 +117,8 @@
|
|||||||
* removal of Satisfy, Allow, Deny, Order
|
* removal of Satisfy, Allow, Deny, Order
|
||||||
* 20060110.1 (2.3.0-dev) minex and minex_set members added to
|
* 20060110.1 (2.3.0-dev) minex and minex_set members added to
|
||||||
* cache_server_conf (minor)
|
* cache_server_conf (minor)
|
||||||
|
* 20060110.2 (2.3.0-dev) flush_packets and flush_wait members added to
|
||||||
|
* proxy_server (minor)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
|
#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
|
||||||
|
@@ -218,25 +218,25 @@ static const char *set_worker_param(apr_pool_t *p,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!strcasecmp(key, "ajpflushpackets")) {
|
else if (!strcasecmp(key, "flushpackets")) {
|
||||||
if (!strcasecmp(val, "on"))
|
if (!strcasecmp(val, "on"))
|
||||||
worker->ajp_flush_packets = ajp_flush_on;
|
worker->flush_packets = flush_on;
|
||||||
else if (!strcasecmp(val, "off"))
|
else if (!strcasecmp(val, "off"))
|
||||||
worker->ajp_flush_packets = ajp_flush_off;
|
worker->flush_packets = flush_off;
|
||||||
else if (!strcasecmp(val, "auto"))
|
else if (!strcasecmp(val, "auto"))
|
||||||
worker->ajp_flush_packets = ajp_flush_auto;
|
worker->flush_packets = flush_auto;
|
||||||
else
|
else
|
||||||
return "FlushPackets must be On|Off|Auto";
|
return "flushpackets must be on|off|auto";
|
||||||
}
|
}
|
||||||
else if (!strcasecmp(key, "ajpflushwait")) {
|
else if (!strcasecmp(key, "flushwait")) {
|
||||||
ival = atoi(val);
|
ival = atoi(val);
|
||||||
if (ival > 1000 || ival < 0) {
|
if (ival > 1000 || ival < 0) {
|
||||||
return "AJPFlushWait must be <= 1000, or 0 for system default of 10 millseconds.";
|
return "flushwait must be <= 1000, or 0 for system default of 10 millseconds.";
|
||||||
}
|
}
|
||||||
if (ival == 0)
|
if (ival == 0)
|
||||||
worker->ajp_flush_wait = AJP_FLUSH_WAIT;
|
worker->flush_wait = PROXY_FLUSH_WAIT;
|
||||||
else
|
else
|
||||||
worker->ajp_flush_wait = ival * 1000; /* change to microseconds */
|
worker->flush_wait = ival * 1000; /* change to microseconds */
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return "unknown Worker parameter";
|
return "unknown Worker parameter";
|
||||||
|
@@ -303,18 +303,18 @@ struct proxy_worker {
|
|||||||
#endif
|
#endif
|
||||||
void *context; /* general purpose storage */
|
void *context; /* general purpose storage */
|
||||||
enum {
|
enum {
|
||||||
ajp_flush_off,
|
flush_off,
|
||||||
ajp_flush_on,
|
flush_on,
|
||||||
ajp_flush_auto
|
flush_auto
|
||||||
} ajp_flush_packets; /* control AJP flushing */
|
} flush_packets; /* control AJP flushing */
|
||||||
int ajp_flush_wait; /* poll wait time in microseconds if flush_auto */
|
int flush_wait; /* poll wait time in microseconds if flush_auto */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wait 10000 microseconds to find out if more data is currently
|
* Wait 10000 microseconds to find out if more data is currently
|
||||||
* available at the backend. Just an arbitrary choose.
|
* available at the backend. Just an arbitrary choose.
|
||||||
*/
|
*/
|
||||||
#define AJP_FLUSH_WAIT 10000
|
#define PROXY_FLUSH_WAIT 10000
|
||||||
|
|
||||||
struct proxy_balancer {
|
struct proxy_balancer {
|
||||||
apr_array_header_t *workers; /* array of proxy_workers */
|
apr_array_header_t *workers; /* array of proxy_workers */
|
||||||
|
@@ -317,10 +317,10 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
|
|||||||
r->connection->bucket_alloc);
|
r->connection->bucket_alloc);
|
||||||
APR_BRIGADE_INSERT_TAIL(output_brigade, e);
|
APR_BRIGADE_INSERT_TAIL(output_brigade, e);
|
||||||
|
|
||||||
if ( (conn->worker->ajp_flush_packets == ajp_flush_on) ||
|
if ( (conn->worker->flush_packets == flush_on) ||
|
||||||
( (conn->worker->ajp_flush_packets == ajp_flush_auto) &&
|
( (conn->worker->flush_packets == flush_auto) &&
|
||||||
(apr_poll(conn_poll, 1, &conn_poll_fd,
|
(apr_poll(conn_poll, 1, &conn_poll_fd,
|
||||||
conn->worker->ajp_flush_wait)
|
conn->worker->flush_wait)
|
||||||
== APR_TIMEUP) ) ) {
|
== APR_TIMEUP) ) ) {
|
||||||
e = apr_bucket_flush_create(r->connection->bucket_alloc);
|
e = apr_bucket_flush_create(r->connection->bucket_alloc);
|
||||||
APR_BRIGADE_INSERT_TAIL(output_brigade, e);
|
APR_BRIGADE_INSERT_TAIL(output_brigade, e);
|
||||||
|
@@ -1318,8 +1318,8 @@ PROXY_DECLARE(const char *) ap_proxy_add_worker(proxy_worker **worker,
|
|||||||
(*worker)->hostname = uri.hostname;
|
(*worker)->hostname = uri.hostname;
|
||||||
(*worker)->port = uri.port;
|
(*worker)->port = uri.port;
|
||||||
(*worker)->id = proxy_lb_workers;
|
(*worker)->id = proxy_lb_workers;
|
||||||
(*worker)->ajp_flush_packets = ajp_flush_off;
|
(*worker)->flush_packets = flush_off;
|
||||||
(*worker)->ajp_flush_wait = AJP_FLUSH_WAIT;
|
(*worker)->flush_wait = PROXY_FLUSH_WAIT;
|
||||||
/* Increase the total worker count */
|
/* Increase the total worker count */
|
||||||
proxy_lb_workers++;
|
proxy_lb_workers++;
|
||||||
init_conn_pool(p, *worker);
|
init_conn_pool(p, *worker);
|
||||||
|
Reference in New Issue
Block a user