Ns limits

From AOLserver Wiki
Jump to: navigation, search

NAME

ns_limits - Resource management via limit sets (new in AOLserver 4.5)

SYNOPSIS

ns_limits option ?arg arg ...?

DESCRIPTION

This command command enables setting various resource limits for specified method/url combinations. These limits include such items as max concurrent connections, max file upload size, and timeouts waiting for connection processing. When limits are exceeded, connections are immediately dispatched to a dedicated error pool connection processing pool to generate a quick error response. By default all requests share the same default limits. Coupled with the new "ns_pools" command, URL-based limits can provide for sophisticated resource management.
This command can be used to set to retrieve various pieces of information about a pool configuration.
  • ns_limits set limit-set ? -maxrun value? ? -maxwait value? ? -maxupload value? ? -timeout value?
Configure the specified limit-set with the given values. maxrun specifies the maximum number of connections which can be running simultaneously bound to the limit-set (default 100). maxwait specifies the maximum number of connections waiting, when no connection thread is available (default 100). maxupload is the maximum size of a PUT or POST request (default: 10 MB), timeout is the maximum number of seconds to wait to be run before being overflown to the error pool (default 60). Connections in excess of maxwait limit or those whose wait exceeds the timeout are overflown to the error pool which serves a 503 Server Busy Error message.
  • ns_limits get limit-set
Returns a map (list of attribute value pairs in array get format) for the specified limit-set (e.g. default). The command returns values for the following attributes nrunning, nwaiting, ntimeout, ndropped, noverflow, maxwait, maxupload, timeout and maxrun, where nrunnning is the number of connections currently running with a URL registered to this limit-set and nwaiting is the number of connections currently waiting for a connection thread due to the maxrun limit of this limit-set. ntimeout, ndropped and noverflow are the number of connections since startup that have timed-out on waiting, been dropped by the remote client, and were overflown to the error pool (due to either timeout or exceeding the maxwait limit) respectively.
  • ns_limits list ?pattern?
Returns a list of the configured resource limit-sets optionally matching glob pattern in pattern. AOLserver creates a default limit-set called default
  • ns_limits register limit-set server method url
Register limit-set for requests issued to the specified server, HTTP method and url

EXAMPLES

ns_limits get default

SEE ALSO

ns_pools

Category Documentation - Category Core Tcl API