From: Luca Toscano Date: Wed, 10 Feb 2016 22:45:27 +0000 (+0000) Subject: Documentation rebuild X-Git-Tag: 2.4.19~211 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=df050c7107c6c7e659b66be74663da2e1d6aa561;p=apache Documentation rebuild git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1729750 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/directives.html.en b/docs/manual/mod/directives.html.en index 39a87a30fe..0b5c9570ec 100644 --- a/docs/manual/mod/directives.html.en +++ b/docs/manual/mod/directives.html.en @@ -46,7 +46,7 @@ summary form.

-

 A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  Q  |  R  |  S  |  T  |  U  |  V  |  W  |  X 

+

 A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  Q  |  R  |  S  |  T  |  U  |  V  |  X 

Available Languages:  de  | diff --git a/docs/manual/mod/event.html.en b/docs/manual/mod/event.html.en index 8cd0ea489d..7a6ddcb550 100644 --- a/docs/manual/mod/event.html.en +++ b/docs/manual/mod/event.html.en @@ -38,12 +38,8 @@ of consuming threads only for connections with active processing

The event Multi-Processing Module (MPM) is designed to allow more requests to be served simultaneously by - passing off some processing work to supporting threads, freeing up - the main threads to work on new requests. It is based on the - worker MPM, which implements a hybrid - multi-process multi-threaded server. Run-time configuration - directives are identical to those provided by - worker.

+ passing off some processing work to the listeners threads, freeing up + the worker threads to serve new requests.

To use the event MPM, add --with-mpm=event to the configure @@ -52,6 +48,7 @@ of consuming threads only for connections with active processing

Topics

Directives

@@ -83,39 +80,111 @@ of consuming threads only for connections with active processing
top
+

Relationship with the Worker MPM

+

event is based on the worker MPM, which implements a hybrid +multi-process multi-threaded server. A single control process (the parent) is responsible for launching +child processes. Each child process creates a fixed number of server +threads as specified in the ThreadsPerChild directive, as well +as a listener thread which listens for connections and passes them to a worker thread for processing when they arrive.

+ +

Run-time configuration directives are identical to those provided by worker, with the only addition +of the AsyncRequestWorkerFactor.

+ +
top
+

How it Works

This MPM tries to fix the 'keep alive problem' in HTTP. After a client - completes the first request, the client can keep the connection - open, and send further requests using the same socket. This can - save significant overhead in creating TCP connections. However, - Apache HTTP Server traditionally keeps an entire child process/thread waiting - for data from the client, which brings its own disadvantages. To - solve this problem, this MPM uses a dedicated thread to handle both - the Listening sockets, all sockets that are in a Keep Alive state, - and sockets where the handler and protocol filters have done their work - and the only remaining thing to do is send the data to the client. The - status page of mod_status shows how many connections are - in the mentioned states.

- -

The improved connection handling may not work for certain connection - filters that have declared themselves as incompatible with event. In these - cases, this MPM will fall back to the behaviour of the - worker MPM and reserve one worker thread per connection. - All modules shipped with the server are compatible with the event MPM.

- -

A similar restriction is currently present for requests involving an - output filter that needs to read and/or modify the whole response body, - like for example mod_ssl, mod_deflate, or mod_include. If the - connection to the client blocks while the filter is processing the - 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.

- -

The MPM assumes that the underlying apr_pollset - implementation is reasonably threadsafe. This enables the MPM to - avoid excessive high level locking, or having to wake up the listener - thread in order to send it a keep-alive socket. This is currently - only compatible with KQueue and EPoll.

+ completes the first request, it can keep the connection + open, sending further requests using the same socket and saving + significant overhead in creating TCP connections. However, + Apache HTTP Server traditionally keeps an entire child + process/thread waiting for data from the client, which brings its own disadvantages. + To solve this problem, this MPM uses a dedicated listener thread for each process + to handle both the Listening sockets, all sockets that are in a Keep Alive state, + sockets where the handler and protocol filters have done their work + and the ones where the only remaining thing to do is send the data to the client. +

+ +

The total amount of connections that a single process/threads block can handle is regulated + by the AsyncRequestWorkerFactor directive.

+ +

Async connections

+

Async connections would need a fixed dedicated worker thread with the previous MPMs but not with event. + 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. +
+ +
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 + 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.
+ +
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. So in such cases, httpd tries to read the rest of the request to allow the client to consume the response. The lingering close is time bounded but it can take relatively long time, so a worker thread can offload this work to the listener.
+
+ +

These improvements are valid for both HTTP/HTTPS connections.

+ + + +

Limitations

+

The improved connection handling may not work for certain connection + filters that have declared themselves as incompatible with event. In these + cases, this MPM will fall back to the behaviour of the + worker MPM and reserve one worker thread per connection. + All modules shipped with the server are compatible with the event MPM.

+ +

A similar restriction is currently present for requests involving an + output filter that needs to read and/or modify the whole response body, + like for example mod_ssl, mod_deflate, or mod_include. If the + connection to the client blocks while the filter is processing the + 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. Please note that + this limitation is only a corner case, it does not mean that the event MPM + defaults to worker in presence of TLS/SSL connections and/or compression.

+ +

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/proxed 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 + server's stability and memory footprint. +

+ + + +

Background material

+

The event model was made possible by the introduction of new APIs into the supported operating systems:

+ +

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 MPM assumes that the underlying apr_pollset + implementation is reasonably threadsafe. This enables the MPM to + avoid excessive high level locking, or having to wake up the listener + thread in order to send it a keep-alive socket. This is currently + only compatible with KQueue and EPoll.

+ +
top
diff --git a/docs/manual/mod/event.xml.fr b/docs/manual/mod/event.xml.fr index 7597a64b00..afeca05198 100644 --- a/docs/manual/mod/event.xml.fr +++ b/docs/manual/mod/event.xml.fr @@ -1,7 +1,7 @@ - + diff --git a/docs/manual/mod/event.xml.meta b/docs/manual/mod/event.xml.meta index 7b7fc287cf..58ce5cc073 100644 --- a/docs/manual/mod/event.xml.meta +++ b/docs/manual/mod/event.xml.meta @@ -8,6 +8,6 @@ en - fr + fr diff --git a/docs/manual/mod/index.html.en b/docs/manual/mod/index.html.en index e7ce7ea281..a0e2eaf457 100644 --- a/docs/manual/mod/index.html.en +++ b/docs/manual/mod/index.html.en @@ -57,19 +57,10 @@ available
mpm_common
A collection of directives that are implemented by more than one multi-processing module (MPM)
-
event
A variant of the worker MPM with the goal -of consuming threads only for connections with active processing
-
mpm_netware
Multi-Processing Module implementing an exclusively threaded web - server optimized for Novell NetWare
-
mpmt_os2
Hybrid multi-process, multi-threaded MPM for OS/2
-
prefork
Implements a non-threaded, pre-forking web server
-
mpm_winnt
Multi-Processing Module optimized for Windows NT.
-
worker
Multi-Processing Module implementing a hybrid - multi-threaded multi-process web server
top

Other Modules

-

 A  |  B  |  C  |  D  |  E  |  F  |  H  |  I  |  L  |  M  |  N  |  P  |  R  |  S  |  U  |  V  |  W  |  X 

+

 A  |  B  |  C  |  D  |  E  |  F  |  H  |  I  |  L  |  M  |  N  |  P  |  R 

mod_access_compat
Group authorizations based on host (name or IP address)
mod_actions
Execute CGI scripts based on media type or request method.
@@ -203,47 +194,6 @@ via the request headers.
mod_reqtimeout
Set timeout and minimum data rate for receiving requests
mod_request
Filters to handle and make available HTTP request bodies
-
mod_rewrite
Provides a rule-based rewriting engine to rewrite requested -URLs on the fly
-
mod_sed
Filter Input (request) and Output (response) content using sed syntax
-
mod_session
Session support
-
mod_session_cookie
Cookie based session support
-
mod_session_crypto
Session encryption support
-
mod_session_dbd
DBD/SQL based session support
-
mod_setenvif
Allows the setting of environment variables based -on characteristics of the request
-
mod_slotmem_plain
Slot-based shared memory provider.
-
mod_slotmem_shm
Slot-based shared memory provider.
-
mod_so
Loading of executable code and -modules into the server at start-up or restart time
-
mod_socache_dbm
DBM based shared object cache provider.
-
mod_socache_dc
Distcache based shared object cache provider.
-
mod_socache_memcache
Memcache based shared object cache provider.
-
mod_socache_shmcb
shmcb based shared object cache provider.
-
mod_speling
Attempts to correct mistaken URLs by ignoring -capitalization, or attempting to correct various minor -misspellings.
-
mod_ssl
Strong cryptography using the Secure Sockets -Layer (SSL) and Transport Layer Security (TLS) protocols
-
mod_status
Provides information on server activity and -performance
-
mod_substitute
Perform search and replace operations on response bodies
-
mod_suexec
Allows CGI scripts to run as a specified user -and Group
-
mod_unique_id
Provides an environment variable with a unique -identifier for each request
-
mod_unixd
Basic (required) security for Unix-family platforms.
-
mod_userdir
User-specific directories
-
mod_usertrack
-Clickstream logging of user activity on a site -
-
mod_version
Version dependent configuration
-
mod_vhost_alias
Provides for dynamically configured mass virtual -hosting
-
mod_watchdog
provides infrastructure for other modules to periodically run - tasks
-
mod_xml2enc
Enhanced charset/internationalisation support for libxml2-based -filter modules

Available Languages:  de  | diff --git a/docs/manual/sitemap.html.en b/docs/manual/sitemap.html.en index ae1f6e4f85..25dbce0e73 100644 --- a/docs/manual/sitemap.html.en +++ b/docs/manual/sitemap.html.en @@ -279,7 +279,6 @@ log_server_status

  • Apache Module mod_remoteip
  • Apache Module mod_reqtimeout
  • Apache Module mod_request
  • -
  • Apache Module mod_rewrite
  • Apache Module mod_sed
  • Apache Module mod_session
  • Apache Module mod_session_cookie