session_shared — Metaproxy Module for sharing system resources between threads


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:

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).


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

namespace mp = ""

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 }?




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





Copyright (C) 2005-2018 Index Data