Name

session_shared — Metaproxy Module for sharing system resources between threads

DESCRIPTION

This filter implements global sharing of result sets (i.e. between threads and therefore between clients), yielding performance improvements especially when incoming requests are from a stateless environment such as a web-server, in which the client process representing a session might be any one of many. It performs the following actions:

  • Reduce the number of backend server sessions.

  • Reduce the number of initializations with backend servers.

  • Optimize the use of result-sets.

Configurable values:

Init ignore-auth

By default, authentication information is passed on for session_shared and no sessions with different authentication parameters are ever shared. By setting ignore-auth to true, session_shared will ignore the authentication sent by client (or previous filter in chain) and always make it absent in the following init request. This is useful a service is truly open and clients, by mistake, send authentication information anyway and you want session_shared to share more sessions.

Session TTL

When a backend session is idle for more than this amount of time, given in seconds, it will be closed. Default value is 90 seconds.

Session max

Specifies the maximum number of sessions to any particular target. If this number (limit) is reached, the session_shared module will re-use result sets even if TTL is not met. Failing that, the session_shared will return a diagnostic. Default value is 100 sessions.

Result-Set TTL

When a backend session result-set is not in use for more than this amount of time, given in seconds, it will be deleted/reused. Default value is 30 seconds.

Result-Set max

This specifies the maximum number of result-sets in use by a backend. The number only applies to targets/servers with named result sets. Targets that do not support named result sets may only have one active result set. Default value is 10.

Result-Set restart

Boolean which specifies whether session_shared should try to recover a failed search. If a search results in diagnostic 2: temporary system error, or a negative hit count, the search will be performed once again on another or new Z39.50 session. Default value is true (enabled).

SCHEMA

# Metaproxy XML config file schemas
#
#   Copyright (C) Index Data
#   See the LICENSE file for details.

namespace mp = "http://indexdata.com/metaproxy"

filter_session_shared =
  attribute type { "session_shared" },
  attribute id { xsd:NCName }?,
  attribute name { xsd:NCName }?,
  element mp:resultset {
    attribute max { xsd:integer }?,
    attribute ttl { xsd:integer }?,
    attribute optimizesearch { xsd:boolean }?,
    attribute restart { xsd:boolean }?
  }?,
  element mp:session {
    attribute ttl { xsd:integer }?,
    attribute max { xsd:integer }?
  }?,
  element mp:init {
    attribute preferred-message-size { xsd:integer }?,
    attribute maximum-record-size { xsd:integer }?,
    attribute ignore-auth { xsd:boolean }?
  }?

   

EXAMPLES

Configuration:

    <filter type="session_shared">
     <resultset ttl="10" max="3" restart="true"/>
     <session ttl="30" max="100"/>
     <init ignore-auth="true"/>
    </filter>

   

SEE ALSO

metaproxy(1)

COPYRIGHT

Copyright (C) 2005-2023 Index Data