annotate xml/en/docs/stream/ngx_stream_keyval_module.xml @ 3011:55d49eb065ac

Fixed example in the js_periodic directive.
author Yaroslav Zhuravlev <yar@nginx.com>
date Thu, 14 Sep 2023 16:38:00 +0100
parents 79ebb6a3812b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2028
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1 <?xml version="1.0"?>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3 <!--
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
4 Copyright (C) Nginx, Inc.
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
5 -->
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
6
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
8
2082
fee7627f6a5a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2030
diff changeset
9 <module name="Module ngx_stream_keyval_module"
fee7627f6a5a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2030
diff changeset
10 link="/en/docs/stream/ngx_stream_keyval_module.html"
2028
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
11 lang="en"
2808
79ebb6a3812b Added info about modifying keyval_zone state file.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2806
diff changeset
12 rev="11">
2028
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
13
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
14 <section id="summary">
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
15
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
16 <para>
2082
fee7627f6a5a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2030
diff changeset
17 The <literal>ngx_stream_keyval_module</literal> module (1.13.7) creates variables
2028
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
18 with values taken from key-value pairs managed by the
2806
462ca0f20a3d Documented variables support for stream keyval module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2542
diff changeset
19 <link doc="../http/ngx_http_api_module.xml" id="stream_keyvals_">API</link>
462ca0f20a3d Documented variables support for stream keyval module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2542
diff changeset
20 or a variable that can also be set with
462ca0f20a3d Documented variables support for stream keyval module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2542
diff changeset
21 <link url="https://github.com/nginx/njs-examples/">njs</link>.
2028
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
22 </para>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
23
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
24 <para>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
25 <note>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
26 This module is available as part of our
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
27 <commercial_version>commercial subscription</commercial_version>.
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
28 </note>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
29 </para>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
30
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
31 </section>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
32
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
33
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
34 <section id="example" name="Example Configuration">
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
35
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
36 <para>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
37 <example>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
38 http {
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
39
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
40 server {
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
41 ...
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
42 location /api {
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
43 api write=on;
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
44 }
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
45 }
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
46 }
2082
fee7627f6a5a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2030
diff changeset
47
fee7627f6a5a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2030
diff changeset
48 stream {
fee7627f6a5a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2030
diff changeset
49
2542
bde7cd9a1173 Added examples of state path to keyval.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2472
diff changeset
50 keyval_zone zone=one:32k state=/var/lib/nginx/state/one.keyval;
2082
fee7627f6a5a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2030
diff changeset
51 keyval $ssl_server_name $name zone=one;
fee7627f6a5a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2030
diff changeset
52
fee7627f6a5a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2030
diff changeset
53 server {
fee7627f6a5a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2030
diff changeset
54 listen 12345 ssl;
fee7627f6a5a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2030
diff changeset
55 proxy_pass $name;
fee7627f6a5a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2030
diff changeset
56 ssl_certificate /usr/local/nginx/conf/cert.pem;
fee7627f6a5a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2030
diff changeset
57 ssl_certificate_key /usr/local/nginx/conf/cert.key;
fee7627f6a5a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2030
diff changeset
58 }
fee7627f6a5a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2030
diff changeset
59 }
2028
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
60 </example>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
61 </para>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
62
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
63 </section>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
64
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
65
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
66 <section id="directives" name="Directives">
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
67
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
68 <directive name="keyval">
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
69 <syntax>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
70 <value>key</value>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
71 <value>$variable</value>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
72 <literal>zone</literal>=<value>name</value></syntax>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
73 <default/>
2082
fee7627f6a5a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2030
diff changeset
74 <context>stream</context>
2028
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
75
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
76 <para>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
77 Creates a new <value>$variable</value> whose value
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
78 is looked up by the <value>key</value> in the key-value database.
2444
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
79 Matching rules are defined by the
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
80 <link id="keyval_type"><literal>type</literal></link> parameter of the
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
81 <link id="keyval_zone"><literal>keyval_zone</literal></link> directive.
2028
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
82 The database is stored in a shared memory zone
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
83 specified by the <literal>zone</literal> parameter.
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
84 </para>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
85
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
86 </directive>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
87
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
88
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
89 <directive name="keyval_zone">
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
90 <syntax>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
91 <literal>zone</literal>=<value>name</value>:<value>size</value>
2230
283b1e67eaa6 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2192
diff changeset
92 [<literal>state</literal>=<value>file</value>]
283b1e67eaa6 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2192
diff changeset
93 [<literal>timeout</literal>=<value>time</value>]
2469
98fd810c13e0 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2444
diff changeset
94 [<literal>type</literal>=<literal>string</literal>|<literal>ip</literal>|<literal>prefix</literal>]
2230
283b1e67eaa6 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2192
diff changeset
95 [<literal>sync</literal>]</syntax>
2028
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
96 <default/>
2082
fee7627f6a5a Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2030
diff changeset
97 <context>stream</context>
2028
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
98
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
99 <para>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
100 Sets the <value>name</value> and <value>size</value> of the shared memory zone
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
101 that keeps the key-value database.
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
102 Key-value pairs are managed by the
2192
e1337bf9f63b Corrected link in stream keyval module.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2082
diff changeset
103 <link doc="../http/ngx_http_api_module.xml" id="stream_keyvals_">API</link>.
2028
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
104 </para>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
105
2230
283b1e67eaa6 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2192
diff changeset
106 <para id="keyval_state">
2028
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
107 The optional <literal>state</literal> parameter specifies a <value>file</value>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
108 that keeps the current state of the key-value database in the JSON format
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
109 and makes it persistent across nginx restarts.
2808
79ebb6a3812b Added info about modifying keyval_zone state file.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2806
diff changeset
110 Changing the file content directly should be avoided.
2028
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
111 </para>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
112
2542
bde7cd9a1173 Added examples of state path to keyval.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2472
diff changeset
113 <para>
bde7cd9a1173 Added examples of state path to keyval.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2472
diff changeset
114 Examples:
bde7cd9a1173 Added examples of state path to keyval.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2472
diff changeset
115 <example>
bde7cd9a1173 Added examples of state path to keyval.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2472
diff changeset
116 keyval_zone zone=one:32k state=/var/lib/nginx/state/one.keyval; # path for Linux
bde7cd9a1173 Added examples of state path to keyval.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2472
diff changeset
117 keyval_zone zone=one:32k state=/var/db/nginx/state/one.keyval; # path for FreeBSD
bde7cd9a1173 Added examples of state path to keyval.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2472
diff changeset
118 </example>
bde7cd9a1173 Added examples of state path to keyval.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2472
diff changeset
119 </para>
bde7cd9a1173 Added examples of state path to keyval.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2472
diff changeset
120
2230
283b1e67eaa6 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2192
diff changeset
121 <para id="keyval_timeout">
283b1e67eaa6 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2192
diff changeset
122 The optional <literal>timeout</literal> parameter (1.15.0) sets
283b1e67eaa6 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2192
diff changeset
123 the time after which key-value pairs are removed from the zone.
283b1e67eaa6 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2192
diff changeset
124 </para>
283b1e67eaa6 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2192
diff changeset
125
2424
dd3ac7eefeed Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2328
diff changeset
126 <para id="keyval_type">
2444
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
127 The optional <literal>type</literal> parameter (1.17.1) activates
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
128 an extra index optimized for matching the key of a certain type
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
129 and defines matching rules when evaluating
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
130 a <link id="keyval">keyval</link> <literal>$variable</literal>.
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
131 <note>
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
132 The index is stored in the same shared memory zone
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
133 and thus requires additional storage.
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
134 </note>
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
135
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
136 <list type="tag">
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
137
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
138 <tag-name id="keyval_type_string"><literal>type=string</literal></tag-name>
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
139 <tag-desc>
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
140 default, no index is enabled;
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
141 variable lookup is performed using exact match
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
142 of the record key and a search key
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
143 </tag-desc>
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
144
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
145 <tag-name id="keyval_type_ip"><literal>type=ip</literal></tag-name>
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
146 <tag-desc>
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
147 the search key is the textual representation of IPv4 or IPv6 address
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
148 or CIDR range;
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
149 to match a record key, the search key must belong to a subnet
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
150 specified by a record key or exactly match an IP address
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
151 </tag-desc>
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
152
2469
98fd810c13e0 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2444
diff changeset
153 <tag-name id="keyval_type_prefix"><literal>type=prefix</literal></tag-name>
98fd810c13e0 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2444
diff changeset
154 <tag-desc>
98fd810c13e0 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2444
diff changeset
155 variable lookup is performed using prefix match
98fd810c13e0 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2444
diff changeset
156 of a record key and a search key (1.17.5);
98fd810c13e0 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2444
diff changeset
157 to match a record key, the record key must be a prefix of the search key
98fd810c13e0 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2444
diff changeset
158 </tag-desc>
98fd810c13e0 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2444
diff changeset
159
2444
d58fc33a0830 Improved description of stream keyval types.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 2424
diff changeset
160 </list>
2424
dd3ac7eefeed Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2328
diff changeset
161 </para>
dd3ac7eefeed Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2328
diff changeset
162
2230
283b1e67eaa6 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2192
diff changeset
163 <para id="keyval_sync">
283b1e67eaa6 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2192
diff changeset
164 The optional <literal>sync</literal> parameter (1.15.0) enables
283b1e67eaa6 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2192
diff changeset
165 <link doc="ngx_stream_zone_sync_module.xml" id="zone_sync">synchronization</link>
283b1e67eaa6 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2192
diff changeset
166 of the shared memory zone.
283b1e67eaa6 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2192
diff changeset
167 The synchronization requires the
2328
9aa6f3f76055 Described synchronization of delete operations in keyval module.
Vladimir Homutov <vl@nginx.com>
parents: 2230
diff changeset
168 <literal>timeout</literal> parameter to be set.
9aa6f3f76055 Described synchronization of delete operations in keyval module.
Vladimir Homutov <vl@nginx.com>
parents: 2230
diff changeset
169 <note>
9aa6f3f76055 Described synchronization of delete operations in keyval module.
Vladimir Homutov <vl@nginx.com>
parents: 2230
diff changeset
170 If the synchronization is enabled, removal of key-value pairs (no matter
9aa6f3f76055 Described synchronization of delete operations in keyval module.
Vladimir Homutov <vl@nginx.com>
parents: 2230
diff changeset
171 <link doc="../http/ngx_http_api_module.xml" id="patchStreamKeyvalZoneKeyValue">one</link>
9aa6f3f76055 Described synchronization of delete operations in keyval module.
Vladimir Homutov <vl@nginx.com>
parents: 2230
diff changeset
172 or
9aa6f3f76055 Described synchronization of delete operations in keyval module.
Vladimir Homutov <vl@nginx.com>
parents: 2230
diff changeset
173 <link doc="../http/ngx_http_api_module.xml" id="deleteStreamKeyvalZoneData">all</link>)
9aa6f3f76055 Described synchronization of delete operations in keyval module.
Vladimir Homutov <vl@nginx.com>
parents: 2230
diff changeset
174 will be performed only on a target cluster node.
9aa6f3f76055 Described synchronization of delete operations in keyval module.
Vladimir Homutov <vl@nginx.com>
parents: 2230
diff changeset
175 The same key-value pairs on other cluster nodes
9aa6f3f76055 Described synchronization of delete operations in keyval module.
Vladimir Homutov <vl@nginx.com>
parents: 2230
diff changeset
176 will be removed upon <literal>timeout</literal>.
9aa6f3f76055 Described synchronization of delete operations in keyval module.
Vladimir Homutov <vl@nginx.com>
parents: 2230
diff changeset
177 </note>
2230
283b1e67eaa6 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2192
diff changeset
178 </para>
283b1e67eaa6 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents: 2192
diff changeset
179
2028
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
180 </directive>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
181
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
182 </section>
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
183
5c55b7054b58 Updated docs for the upcoming NGINX Plus release.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
184 </module>