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">
7 <refentry id="ref-frontend_net">
9 <productname>Metaproxy</productname>
10 <orgname>Index Data</orgname>
14 <refentrytitle>frontend_net</refentrytitle>
15 <manvolnum>3mp</manvolnum>
16 <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
20 <refname>frontend_net</refname>
21 <refpurpose>Metaproxy Network Server module that accepts Z39.50 and
22 HTTP requests</refpurpose>
25 <refsect1><title>DESCRIPTION</title>
27 This is a frontend module. Listens on one or more ports and
28 sends HTTP/Z39.50 messages to other filters.
32 <refsect1><title>CONFIGURATION</title>
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).
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).
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.
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.
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).
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.
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>.
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.
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).
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>.
103 <refsect1><title>SCHEMA</title>
104 <literallayout><xi:include
105 xi:href="../xml/schema/filter_frontend_net.rnc"
107 xmlns:xi="http://www.w3.org/2001/XInclude" />
111 <refsect1><title>EXAMPLES</title>
113 A typical configuration looks like this:
115 <filter type="frontend_net">
116 <threads>10</threads>
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>
131 <refsect1><title>SEE ALSO</title>
134 <refentrytitle>metaproxy</refentrytitle>
135 <manvolnum>1</manvolnum>
143 <!-- Keep this comment at the end of the file