Mercurial > hg > nginx-site
comparison xml/en/docs/stream/ngx_stream_keyval_module.xml @ 2444:d58fc33a0830
Improved description of stream keyval types.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Wed, 16 Oct 2019 19:02:24 +0300 |
parents | dd3ac7eefeed |
children | 98fd810c13e0 |
comparison
equal
deleted
inserted
replaced
2443:9d4b00f3ad2b | 2444:d58fc33a0830 |
---|---|
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | 7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
8 | 8 |
9 <module name="Module ngx_stream_keyval_module" | 9 <module name="Module ngx_stream_keyval_module" |
10 link="/en/docs/stream/ngx_stream_keyval_module.html" | 10 link="/en/docs/stream/ngx_stream_keyval_module.html" |
11 lang="en" | 11 lang="en" |
12 rev="5"> | 12 rev="6"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 The <literal>ngx_stream_keyval_module</literal> module (1.13.7) creates variables | 17 The <literal>ngx_stream_keyval_module</literal> module (1.13.7) creates variables |
73 | 73 |
74 <para> | 74 <para> |
75 Creates a new <value>$variable</value> whose value | 75 Creates a new <value>$variable</value> whose value |
76 is looked up by the <value>key</value> in the key-value database. | 76 is looked up by the <value>key</value> in the key-value database. |
77 Strings are matched ignoring the case. | 77 Strings are matched ignoring the case. |
78 Matching rules are defined by the | |
79 <link id="keyval_type"><literal>type</literal></link> parameter of the | |
80 <link id="keyval_zone"><literal>keyval_zone</literal></link> directive. | |
78 The database is stored in a shared memory zone | 81 The database is stored in a shared memory zone |
79 specified by the <literal>zone</literal> parameter. | 82 specified by the <literal>zone</literal> parameter. |
80 </para> | 83 </para> |
81 | 84 |
82 </directive> | 85 </directive> |
109 The optional <literal>timeout</literal> parameter (1.15.0) sets | 112 The optional <literal>timeout</literal> parameter (1.15.0) sets |
110 the time after which key-value pairs are removed from the zone. | 113 the time after which key-value pairs are removed from the zone. |
111 </para> | 114 </para> |
112 | 115 |
113 <para id="keyval_type"> | 116 <para id="keyval_type"> |
114 The optional <literal>type</literal> parameter (1.17.1) specifies | 117 The optional <literal>type</literal> parameter (1.17.1) activates |
115 the type of the key: | 118 an extra index optimized for matching the key of a certain type |
116 a <literal>string</literal> (default) or <literal>ip</literal>. | 119 and defines matching rules when evaluating |
117 For the <literal>ip</literal> type, | 120 a <link id="keyval">keyval</link> <literal>$variable</literal>. |
118 the key must be the textual representation of an IP address | 121 <note> |
119 specified in CIDR notation. | 122 The index is stored in the same shared memory zone |
120 In this case, | 123 and thus requires additional storage. |
121 an additional index optimized for matching IP addresses and networks is used | 124 </note> |
122 in evaluating a variable. | 125 |
126 <list type="tag"> | |
127 | |
128 <tag-name id="keyval_type_string"><literal>type=string</literal></tag-name> | |
129 <tag-desc> | |
130 default, no index is enabled; | |
131 variable lookup is performed using exact match | |
132 of the record key and a search key | |
133 </tag-desc> | |
134 | |
135 <tag-name id="keyval_type_ip"><literal>type=ip</literal></tag-name> | |
136 <tag-desc> | |
137 the search key is the textual representation of IPv4 or IPv6 address | |
138 or CIDR range; | |
139 to match a record key, the search key must belong to a subnet | |
140 specified by a record key or exactly match an IP address | |
141 </tag-desc> | |
142 | |
143 </list> | |
123 </para> | 144 </para> |
124 | 145 |
125 <para id="keyval_sync"> | 146 <para id="keyval_sync"> |
126 The optional <literal>sync</literal> parameter (1.15.0) enables | 147 The optional <literal>sync</literal> parameter (1.15.0) enables |
127 <link doc="ngx_stream_zone_sync_module.xml" id="zone_sync">synchronization</link> | 148 <link doc="ngx_stream_zone_sync_module.xml" id="zone_sync">synchronization</link> |