Mercurial > hg > nginx-site
annotate xml/en/docs/events.xml @ 561:e6b7931fc9ea
A link to nginx part of The Architecture of Open Source
Applications book added.
author | Maxim Konovalov <maxim@nginx.com> |
---|---|
date | Mon, 02 Jul 2012 14:17:35 +0000 |
parents | b4e34b473283 |
children | ffafb169cca9 |
rev | line source |
---|---|
553
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1 <!DOCTYPE article SYSTEM "../../../dtd/article.dtd"> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
3 <article name="Connection processing methods" |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
4 link="/en/docs/events.html" |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
5 lang="en"> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
6 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
7 <section> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
9 <para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
10 nginx supports a variety of connection processing methods. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
11 The availability of a particular method depends on the platform used. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
12 On platforms that support several methods nginx will normally |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
13 select the most efficient method automatically. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
14 However, if needed, a connection processing method can be selected |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
15 explicitly with the |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
16 <link doc="ngx_core_module.xml" id="use"/> directive. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
17 </para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
18 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
19 <para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
20 The following connection processing methods are supported: |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
21 <list type="bullet"> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
22 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
23 <listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
24 <para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
25 <literal>select</literal>—standard method. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
26 The supporting module is built automatically on platforms that lack |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 more efficient methods. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
28 The <literal>--with-select_module</literal> and |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
29 <literal>--without-select_module</literal> configuration parameters |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
30 can be used to forcibly enable or disable the build of this module. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
31 </para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 </listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
33 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
34 <listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
35 <para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
36 <literal>poll</literal>—standard method. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
37 The supporting module is built automatically on platforms that lack |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
38 more efficient methods. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
39 The <literal>--with-poll_module</literal> and |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
40 <literal>--without-poll_module</literal> configuration parameters |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
41 can be used to forcibly enable or disable the build of this module. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
42 </para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
43 </listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
44 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
45 <listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
46 <para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
47 <literal>kqueue</literal>—efficient method used on |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
48 FreeBSD 4.1+, OpenBSD 2.9+, NetBSD 2.0, and Mac OS X. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
49 <note> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
50 On two-processor machines running some older versions of Mac OS X |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
51 the use of kqueue may cause a kernel panic. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
52 </note> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
53 </para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
54 </listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
55 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
56 <listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
57 <para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
58 <literal>epoll</literal>—efficient method used on |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
59 Linux 2.6+. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
60 <note> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
61 Some older distributions like SuSEĀ 8.2 provide patches |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
62 that add epoll support to 2.4 kernels. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
63 </note> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
64 </para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
65 </listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
66 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
67 <listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
68 <para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
69 <literal>rtsig</literal>—real time signals, efficient method |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
70 used on Linux 2.2.19+. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
71 By default, |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
72 the system-wide event queue is limited by 1024 signals. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
73 On loaded servers it may become necessary to increase this limit |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
74 by changing the <path>/proc/sys/kernel/rtsig-max</path> kernel parameter. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
75 However, in Linux 2.6.6-mm2 this parameter is gone, and each process |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
76 now has its own event queue. |
554
ccb7451af1d8
Documented the "worker_rlimit_sigpending" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
553
diff
changeset
|
77 The size of each queue is limited by <literal>RLIMIT_SIGPENDING</literal> |
ccb7451af1d8
Documented the "worker_rlimit_sigpending" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
553
diff
changeset
|
78 (see also <link doc="ngx_core_module.xml" id="worker_rlimit_sigpending"/>). |
553
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 </para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
80 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
81 <para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
82 On queue overflow, nginx discards the queue and falls back to |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
83 <literal>poll</literal> connection processing method until |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
84 the situation gets back to normal. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
85 </para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
86 </listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
87 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
88 <listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
89 <para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
90 <literal>/dev/poll</literal>—efficient method used on |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
91 Solaris 7 11/99+, HP/UX 11.22+ (eventport), IRIX 6.5.15+, |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
92 and Tru64 UNIX 5.1A+. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
93 </para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
94 </listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
95 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
96 <listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
97 <para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
98 <literal>eventport</literal>—event ports, efficient method |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
99 used on Solaris 10. |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
100 </para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
101 </listitem> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
102 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
103 </list> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
104 </para> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
105 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
106 </section> |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
107 |
6330ca27a485
Translated "events" into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
108 </article> |