X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=doc%2Fproxy.xml;h=0fdbd1306d316b865e3c20588477ab058da32e08;hb=9e1bd9899f0a7d7e7c0a9097ffb1ff64db2627c9;hp=2e26476f5eee7004a45144682590e86e8fd4e96c;hpb=a0954355a5d3cc8685283d2102dec4b6d4284eab;p=yazpp-moved-to-github.git diff --git a/doc/proxy.xml b/doc/proxy.xml index 2e26476..0fdbd13 100644 --- a/doc/proxy.xml +++ b/doc/proxy.xml @@ -58,7 +58,7 @@ start it up. It will work exactly as usual, but all the packets will be sent via the proxy, which will generate a log like this: - + @@ -172,7 +173,7 @@ When a client reconnects, query and record caching works better, if the proxy assigns it to the same backend as before. And the result set - (if any) is re-used. To achive this, Index Data defined a session + (if any) is re-used. To achieve this, Index Data defined a session cookie which identifies the backend session. @@ -289,7 +290,6 @@ <?xml version="1.0"?> - <!-- $Id --> <proxy> <!-- content here .. --> </proxy> @@ -299,7 +299,7 @@ Configuration: target The element target which may be repeated zero - or more times with parent elemtn proxy contains + or more times with parent element proxy contains information about each backend target. The target element have two attributes: name which holds the logical name of the backend @@ -310,7 +310,6 @@ <?xml version="1.0"?> - <!-- $Id --> <proxy> <target name="server1" default="1"> <!-- description of server1 .. --> @@ -347,15 +346,25 @@ bandwidth and pdu. The bandwidth is the maximum total bytes transferred to/from the target. If a target session exceeds this - amount it is shut down (and no longer kept alive). + limit, it is shut down (and no longer kept alive). The pdu is the maximum number of requests sent - to the target. If a target session exceeds this amount it is + to the target. If a target session exceeds this limit, it is shut down. The idea of these two limits is that avoid very long - sessions that eat resources in a backend (that leaks!). + sessions that use resources in a backend (that leaks!). + + + The following sets maximum number of bytes transferred in a + target session to 1 MB and maxinum of requests to 400. + + <keepalive> + <bandwidth>1048576</bandwidth> + <retrieve>400</retrieve> + </keepalive> +
- Configuration:limit + Configuration: limit The limit section specifies bandwidth/pdu requests limits for an active session. @@ -366,7 +375,7 @@ measures the number of bytes transferred within the last minute. The pdu is the number of requests in the last minute. The retrieve holds the maximum records to - be retrived in one Present Request. + be retrieved in one Present Request. If a bandwidth/pdu limit is reached the proxy will postpone the @@ -374,6 +383,22 @@ limit is to ensure that clients that downloads hundreds or thousands of records do not hurt other users. + + The following sets maximum number of bytes transferred per minute to + 500Kbytes and maximum number of requests to 40. + + <limit> + <bandwidth>524288</bandwidth> + <retrieve>40</retrieve> + </limit> + + + + + Typically the limits for keepalive are much higher than + those for session minute average. + +
@@ -381,11 +406,28 @@ The attribute element specifies accept or reject or a particular attribute type, value pair. + Well-behaving targets will reject unsupported attributes on their + own. This feature is useful for targets that do not gracefully + handle unsupported attributes. - The attribute has two required attributes: + Attribute elements may be repeated. The proxy inspects the attribute + specifications in the order as specified in the configuration file. + When a given attribute specification matches a given attribute list + in a query, the proxy takes appropriate action (reject, accept). + + + If no attribute specifications matches the attribute list in a query, + it is accepted. + + + The attribute element has two required attributes: type which is the Attribute Type-1 type, and value which is the Attribute Type-1 value. + The special value/type * matches any attribute + type/value. A value may also be specified as a list with each + value separated by comma, a value may also be specified as a + list: low value - dash - high value. If attribute error is given, that holds a @@ -396,6 +438,14 @@ If attribute error is not given, the attribute type, value is accepted and passed to the backend target. + + A target that supports use attributes 1,4, 1000 through 1003 and + no other use attributes, could use the following rules: + + <attribute type="1" value="1,4,1000-1003"> + <attribute type="1" value="*" error="114"/> + +
@@ -405,7 +455,7 @@ or a particular record syntax request from the client. - The syntax has one equired attribute: + The syntax has one required attribute: type which is the Preferred Record Syntax. @@ -423,14 +473,14 @@ type should be XML. The proxy will use preferred record syntax USMARC/MARC21 against the backend target. - To accept USMARC and offer MARCXML XML recors but reject - all other requests the following configuaration could be used: + To accept USMARC and offer MARCXML XML records but reject + all other requests the following configuration could be used: <proxy> <target name="mytarget"> - <syntax type="usmarc"/> - <syntax type="xml" marcxml="1"/> - <syntax type="*" error="238"/> + <syntax type="usmarc"/> + <syntax type="xml" marcxml="1"/> + <syntax type="*" error="238"/> </target> </proxy> @@ -444,6 +494,10 @@ target and specifies the amount in seconds before a target session is shut down. + + This can also be specified on the command line by using option + -T. Refer to . +
@@ -452,6 +506,10 @@ The element client-timeout is the child of element target and specifies the amount in seconds before a client session is shut down. + + + This can also be specified on the command line by using option + -i. Refer to .
@@ -477,8 +535,98 @@ allowed connections to targets (all targets). If this limit is reached the proxy will close the least recently used connection.
+ + Note, that many Unix systems impose a system on the number of + open files allowed in a single process, typically in the + range 256 (Solaris) to 1024 (Linux). + The proxy uses 2 sockets per session + a few files + for logging. As a rule of thumb, ensure that 2*max-clients + 5 + can be opened by the proxy process. + + + + Using the + bash shell, you can set the limit with + ulimit -nno. + Use ulimit -a to display limits. + + - + +
+ Configuration: log + + The element log is the child of element + proxy and specifies what to be logged by the + proxy. + + + Specify the log file with command-line option -l. + + + The text of the log element is a sequence of + options separated by white space. See the table below: + Logging options + + + + + + Option + Description + + + + + client-apdu + + Log APDUs as reported by YAZ for the + communication between the client and the proxy. + This facility is equivalent to the APDU logging that + happens when using option -a, however + this tells the proxy to log in the same file as given + by -l. + + + + server-apdu + + Log APDUs as reported by YAZ for the + communication between the proxy and the server (backend). + + + + clients-requests + + Log a brief description about requests transferred between + the client and the proxy. The name of the request and the size + of the APDU is logged. + + + + server-requests + + Log a brief description about requests transferred between + the proxy and the server (backend). The name of the request + and the size of the APDU is logged. + + + + +
+
+ + To log communication in details between the proxy and the backend, th + following configuration could be used: + + server-apdu server-requests + +]]> + + +
+
Proxy Usage @@ -531,4 +679,4 @@ sgml-namecase-general:t End: --> - \ No newline at end of file +