From: Mike Rumph Date: Thu, 30 Jan 2020 20:07:26 +0000 (+0000) Subject: Fix some grammar errors in the docs X-Git-Tag: 2.4.42~136 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edbc3187c16835c56c28d1a5bc8903ea837d2a51;p=thirdparty%2Fapache%2Fhttpd.git Fix some grammar errors in the docs git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1873381 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/event.xml b/docs/manual/mod/event.xml index fcbebe61610..f32fcb3bf90 100644 --- a/docs/manual/mod/event.xml +++ b/docs/manual/mod/event.xml @@ -80,24 +80,29 @@ of the AsyncRequestWorkerFactor.

The status page of mod_status shows new columns under the Async connections section:

Writing
-
While sending the response to the client, it might happen that the TCP write buffer fills up because the connection is too slow. Usually in this case a write() to the socket returns EWOULDBLOCK or EAGAIN, to become writable again after an idle time. The worker holding the socket might be able to offload the waiting task to the listener thread, that in turn will re-assign it to the first idle worker thread available once an event will be raised for the socket (for example, "the socket is now writable"). Please check the Limitations section for more information. +
While sending the response to the client, it might happen that the TCP write buffer fills up because the connection is too slow. + Usually in this case, a write() to the socket returns EWOULDBLOCK or EAGAIN to become writable again after an idle time. + The worker holding the socket might be able to offload the waiting task to the listener thread, that in turn will re-assign it to the first idle worker thread available once an event will be raised for the socket (for example, "the socket is now writable"). + Please check the Limitations section for more information.
Keep-alive
Keep Alive handling is the most basic improvement from the worker MPM. Once a worker thread finishes to flush the response to the client, it can offload the - socket handling to the listener thread, that in turns will wait for any event from the + socket handling to the listener thread, that in turn will wait for any event from the OS, like "the socket is readable". If any new request comes from the client, then the listener will forward it to the first worker thread available. Conversely, if the KeepAliveTimeout occurs then the socket will be - closed by the listener. In this way the worker threads are not responsible for idle - sockets and they can be re-used to serve other requests.
+ closed by the listener. In this way, the worker threads are not responsible for idle + sockets, and they can be re-used to serve other requests.
Closing
Sometimes the MPM needs to perform a lingering close, namely sending back an early error to the client while it is still transmitting data to httpd. Sending the response and then closing the connection immediately is not the correct thing to do since the client (still trying to send the rest of the - request) would get a connection reset and could not read the httpd's response. The lingering close is time bounded but it can take relatively long - time, so it's offloaded to a worker thread (including the shutdown hooks and real socket close). From 2.4.28 onward this is also the + request) would get a connection reset and could not read the httpd's response. + The lingering close is time-bounded, but it can take a relatively long + time, so it's offloaded to a worker thread (including the shutdown hooks and real socket close). + From 2.4.28 onward, this is also the case when connections finally timeout (the listener thread never handles connections besides waiting for and dispatching their events).
@@ -107,33 +112,33 @@ of the AsyncRequestWorkerFactor.

Graceful process termination and Scoreboard usage -

This mpm showed some scalability bottlenecks in the past leading to the following +

This mpm showed some scalability bottlenecks in the past, leading to the following error: "scoreboard is full, not at MaxRequestWorkers". MaxRequestWorkers limits the number of simultaneous requests that will be served at any given time and also the number of allowed processes (MaxRequestWorkers - / ThreadsPerChild), meanwhile + / ThreadsPerChild); meanwhile, the Scoreboard is a representation of all the running processes and the status of their worker threads. If the scoreboard is full (so all the threads have a state that is not idle) but the number of active requests served is not MaxRequestWorkers, it means that some of them are blocking new requests that could be served but that are queued instead (up to the limit imposed by - ListenBacklog). Most of the times + ListenBacklog). Most of the time, the threads are stuck in the Graceful state, namely they are waiting to finish their work with a TCP connection to safely terminate and free up a - scoreboard slot (for example handling long running requests, slow clients + scoreboard slot (for example, handling long-running requests, slow clients or connections with keep-alive enabled). Two scenarios are very common:

@@ -186,14 +191,14 @@ of the AsyncRequestWorkerFactor.

data, and the amount of data produced by the filter is too big to be buffered in memory, the thread used for the request is not freed while httpd waits until the pending data is sent to the client.
- To illustrate this point we can think about the following two situations: + To illustrate this point, we can think about the following two situations: serving a static asset (like a CSS file) versus serving content retrieved from FCGI/CGI or a proxied server. The former is predictable, namely the event MPM has full visibility on the end of the content and it can use events: the worker thread serving the response content can flush the first bytes until EWOULDBLOCK or EAGAIN is returned, delegating the rest to the listener. This one in turn - waits for an event on the socket, and delegates the work to flush the rest of the content - to the first idle worker thread. Meanwhile in the latter example (FCGI/CGI/proxied content) + waits for an event on the socket and delegates the work to flush the rest of the content + to the first idle worker thread. Meanwhile in the latter example (FCGI/CGI/proxied content), the MPM can't predict the end of the response and a worker thread has to finish its work before returning the control to the listener. The only alternative is to buffer the response in memory, but it wouldn't be the safest option for the sake of the @@ -211,7 +216,7 @@ of the AsyncRequestWorkerFactor.

Before these new APIs where made available, the traditional select and poll APIs had to be used. Those APIs get slow if used to handle many connections or if the set of connections rate of change is high. - The new APIs allow to monitor much more connections and they perform way better when the set of connections to monitor changes frequently. So these APIs made it possible to write the event MPM, that scales much better with the typical HTTP pattern of many idle connections.

+ The new APIs allow to monitor many more connections, and they perform way better when the set of connections to monitor changes frequently. So these APIs made it possible to write the event MPM, that scales much better with the typical HTTP pattern of many idle connections.

The MPM assumes that the underlying apr_pollset implementation is reasonably threadsafe. This enables the MPM to @@ -241,7 +246,7 @@ of the AsyncRequestWorkerFactor.