Document new features MP-632
[metaproxy-moved-to-github.git] / doc / frontend_net.xml
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
2     "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
3  <!ENTITY copyright SYSTEM "copyright.xml">
4  <!ENTITY % idcommon SYSTEM "common/common.ent">
5      %idcommon;
6 ]>
7 <refentry id="ref-frontend_net">
8  <refentryinfo>
9   <productname>Metaproxy</productname>
10   <orgname>Index Data</orgname>
11  </refentryinfo>
12
13  <refmeta>
14   <refentrytitle>frontend_net</refentrytitle>
15   <manvolnum>3mp</manvolnum>
16   <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
17  </refmeta>
18
19  <refnamediv>
20   <refname>frontend_net</refname>
21   <refpurpose>Metaproxy Network Server module that accepts Z39.50 and
22   HTTP requests</refpurpose>
23  </refnamediv>
24
25  <refsect1><title>DESCRIPTION</title>
26   <para>
27    This is a frontend module. Listens on one or more ports and
28    sends HTTP/Z39.50 messages to other filters.
29   </para>
30  </refsect1>
31
32  <refsect1><title>CONFIGURATION</title>
33   <para>
34    Element <literal>port</literal> is a repeating element (1 or more). The
35    text content specifies a listening port. A few attributes may be
36    given for each port element. Attribute <literal>route</literal> specifies
37    the route to use for the port. Attribute <literal>max_recv_bytes</literal>
38    specifies maximum package size that YAZ should accept (it calls
39    cs_set_max_recv_bytes function of YAZ).
40   </para>
41   <para>
42    Element <literal>threads</literal> is an optional element. The
43    text content specifies number of worker threads for the following
44    filters to use. The default value is 5 (5 worker threads).
45   </para>
46   <para>
47    Element <literal>max-threads</literal> is an optional element. The
48    text content specifies maximum number of worker threads for the following
49    filters to use. By default the thread count is fixed.
50    By using this setting with a higher value than the treads
51    setting extra worker threads will be added as necessary.
52   </para>
53   <para>
54    Element <literal>stack-size</literal> is an optional element. The
55    text content specifies stack size in kilo bytes for worker threads.
56    If omitted, the system default stack size for threads is used.
57   </para>
58   <para>
59    Element <literal>timeout</literal> is an optional element. The
60    text content is treated as an integer that specifies the session timeout
61    in seconds for a client session (using the frontend net filter). The
62    default value is 300 (5 minutes).
63   </para>
64   <para>
65    Element <literal>connect-max</literal> is an optional repeatable element.
66    The text content is treated as an integer that specifies maximum number
67    of accepted TCP sessions from the same original IP. A value of 0
68    means unlimited (no limit). The attribute <literal>ip</literal>
69    specifies an IP-pattern to match. If the IP pattern  is matched, the
70    limit takes effect. By repeating this element with different IP
71    patterns, limits may be configured "per-IP". If no patterns are
72    matched, no limit takes place. The IP pattern is a glob pattern.
73    Blanks in a pattern may be used to provide alternatives.
74    For example:
75    <literal>ip="::1 127*"</literal> would match <literal>::1</literal> or
76    <literal>127.0.0.1</literal> , but not <literal>128.0.0.1</literal>.
77   </para>
78   <para>
79    Element <literal>http-req-max</literal> is an optional repeatable element.
80    The text content is treated as an integer that specifies maximum number
81    of accepted HTTP requests from the same original IP. A value of 0
82    means unlimited (no limit). The attribute <literal>ip</literal>
83    specifies an IP-pattern to match. If the IP pattern is matched, the
84    limit takes effect. By repeating this element with different IP
85    patterns, limits may be configured "per-IP". If no patterns are
86    matched, no limit takes place. The IP pattern is a glob pattern.
87    Blanks in a pattern may be used to provide alternatives.
88   </para>
89   <para>
90    Element <literal>message</literal> is an optional element. If
91    given and non-empty logging is performed by the frontend_net filter
92    (to the log file as given ny option -l).
93   </para>
94   <para>
95    Element <literal>stat-req</literal> is an optional element. It
96    specifies a URL path that triggers a report to be generated by
97    the frontend_net filter. By default this report is disabled (same
98    as empty value). The value itself is the path and should be prefixed
99    with a slash. For example <literal>/fn_stat</literal>.
100   </para>
101  </refsect1>
102
103  <refsect1><title>SCHEMA</title>
104    <literallayout><xi:include
105                      xi:href="../xml/schema/filter_frontend_net.rnc"
106                      xi:parse="text"
107                      xmlns:xi="http://www.w3.org/2001/XInclude" />
108    </literallayout>
109  </refsect1>
110
111  <refsect1><title>EXAMPLES</title>
112   <para>
113    A typical configuration looks like this:
114    <screen><![CDATA[
115     <filter type="frontend_net">
116      <threads>10</threads>
117      <port>@:9000</port>
118      <connect-max>100</connect-max>
119      <!-- allow many HTTP requests from localhost -->
120      <http-req-max ip="::1 127.*">10000</http-req-max>
121      <!-- fewer for outsiders -->
122      <http-req-max>100</http-req-max>
123      <message>FN</message>
124      <stat-req>/fn_stat</stat-req>
125     </filter>
126 ]]>
127    </screen>
128   </para>
129  </refsect1>
130
131  <refsect1><title>SEE ALSO</title>
132   <para>
133    <citerefentry>
134     <refentrytitle>metaproxy</refentrytitle>
135     <manvolnum>1</manvolnum>
136    </citerefentry>
137   </para>
138  </refsect1>
139
140  &copyright;
141 </refentry>
142
143 <!-- Keep this comment at the end of the file
144 Local variables:
145 mode: nxml
146 nxml-child-indent: 1
147 End:
148 -->