Gate object

From i2Rest
Jump to: navigation, search

Gate Object

Object representing settings of main, session or management gate

Field Type Description Default value
url string Gate URL, REQUIRED for Main gate

Unified resource location which will be used to listen incoming requests.
Format (one of):

  • http://<host_name>[:port]
  • https://<host_name>[:port]
  • file://<IFS file>

i2Rest can listen http://, https:// and file:// urls.

With http(s)://, i2Rest server will not distinguish the host name, the value of the port number is only taken into account, i.e. http://api.i2rest.com and http://www.i2rest.com are equal in terms of listener. With such addresses, i2Rest server will start listening on port :80 of current IBM i server.

With file://, i2Rest server will listen incoming connections using unix stream sockets at specified path

Unix stream sockets are available only for clients of the same IBM i server with this i2Rest server instance.

If gate URL is not specified, this gate of i2Rest server will open unix stream socket based on temporary file at /tmp directory

dcm_server_id string DCM Server application ID, REQUIRED for gates with https URL

Defines DCM Server Application ID that will be used to secure incoming https connections.

clients_max integer Maximum number of incoming connections

This gate will not accept more then specified number of incoming connections. If maximum number of incoming connections will be reached, all new connection requests will be refused

1000
client_timeout integer
Client timeout

Timeout value (in milliseconds) of client inactivity time. In case of no activity on client connection during specified amount of time, i2Rest server will close this client connection.

Main and Manager gate - 30000 (30sec)
Session gate - 600000 (10min)
send_timeout integer Client send timeout

Timeout to send a packet of data to client, positive timeout values are seconds, negative timeout values are microseconds, zero means no timeout.

0
recv_timeout integer Client receive timeout

Timeout to receive a packet of data from client, positive timeout values are seconds, negative timeout values are microseconds, zero means no timeout

0
recv_maxsize integer Maximum length of incoming data

Maximum message length that is permitted to be received, zero means unlimited

2147483647 (2GB)
debug integer Debug level

Minimum level of message severity which will be logged at console or syslog. It is possible to define different level of logging for each i2Rest gate and for i2Rest server core itself.

  • 0 - Emergency
  • 1 - Alert
  • 2 - Critical
  • 3 - Error
  • 4 - Warning
  • 5 - Notice
  • 6 - Info
  • 7 - Full
3
syslog
string URL of syslog server

See syslog parameter at i2Rest Config

If not defined - value from top-level configuration will be used

workers_min integer Minimum number of worker threads

i2Rest Server uses process threads to perform work on client's requests. This number defines initial number of threads which will be submitted at server startup to process requests to this gate.

5
watermark integer High load watermark

Number of requests waiting in queue for process by workers, after which a new worker will be started

0
workers_max integer Maximum number of worker threads

i2Rest will not start more than specified number of worker threads for this gate

50