Difference between revisions of "Gate object"

From i2Rest
Jump to: navigation, search
(Created page with "= Gate Object = Object representing settings of main, session or management gate {| style="width: 100%; vertical-align:top; border-collapse:collapse" border...")
 
 
(2 intermediate revisions by one other user not shown)
Line 12: Line 12:
 
|style="padding: 5px"|string
 
|style="padding: 5px"|string
 
|style="padding: 5px"|'''Gate URL, REQUIRED for Main gate'''
 
|style="padding: 5px"|'''Gate URL, REQUIRED for Main gate'''
Unified resource location which will be used to listen incoming requests.<br/><br/>
+
Unified resource location which will be used to listen incoming requests.<br/>
Format (one of):<br/><br/>
+
Format (one of):<br/>
 
* <tt>http://<host_name>[:port]</tt>
 
* <tt>http://<host_name>[:port]</tt>
 
* <tt>https://<host_name>[:port]</tt>
 
* <tt>https://<host_name>[:port]</tt>
Line 19: Line 19:
 
i2Rest can listen <tt>http://</tt>, <tt>https://</tt> and <tt>file://</tt> urls.<br/><br/>
 
i2Rest can listen <tt>http://</tt>, <tt>https://</tt> and <tt>file://</tt> urls.<br/><br/>
 
With <tt>http(s)://</tt>,  i2Rest server will not distinguish the host name, the value of the port number is only taken into account, i.e. <tt><nowiki>http://api.i2rest.com</nowiki></tt> and <tt><nowiki>http://www.i2rest.com</nowiki></tt> are equal in terms of listener. With such addresses, i2Rest server will start listening on port :80 of current IBM i server.<br/><br/>
 
With <tt>http(s)://</tt>,  i2Rest server will not distinguish the host name, the value of the port number is only taken into account, i.e. <tt><nowiki>http://api.i2rest.com</nowiki></tt> and <tt><nowiki>http://www.i2rest.com</nowiki></tt> are equal in terms of listener. With such addresses, i2Rest server will start listening on port :80 of current IBM i server.<br/><br/>
With <tt>file://</tt>, i2Rest server will listen incoming connections using [https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzab6/uafunix.htm|unix stream sockets] at specified path<br/><br/>
+
With <tt>file://</tt>, i2Rest server will listen incoming connections using [https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzab6/uafunix.html unix stream sockets] at specified path<br/><br/>
 
Unix stream sockets are available only for clients of the same IBM i server with this i2Rest server instance.<br/><br/>
 
Unix stream sockets are available only for clients of the same IBM i server with this i2Rest server instance.<br/><br/>
 
If gate URL is not specified, this gate of i2Rest server will open unix stream socket based on temporary file at /tmp directory
 
If gate URL is not specified, this gate of i2Rest server will open unix stream socket based on temporary file at /tmp directory
 +
|
 
|-style="vertical-align:top;"
 
|-style="vertical-align:top;"
 +
|style="padding: 5px"|dcm_server_id
 +
|style="padding: 5px"|string
 +
|style="padding: 5px"|'''DCM Server application ID, REQUIRED for gates with https URL'''<br/>
 +
Defines [[Create Server Application|DCM Server Application ID]] that will be used to secure incoming https connections.
 +
|
 +
|-style="vertical-align:top;"
 +
|style="padding: 5px"|clients_max
 +
|style="padding: 5px"|integer
 +
|style="padding: 5px"|'''Maximum number of incoming connections'''<br/>
 +
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
 +
|style="padding: 5px"|<tt>1000</tt>
 +
|-style="vertical-align:top;"
 +
|style="padding: 5px"|client_timeout
 +
|style="padding: 5px"|integer
 +
|style="padding: 5px"|<div id="client_timeout"></div>'''Client timeout'''<br/>
 +
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.
 +
|style="padding: 5px"|<tt>Main and Manager gate - 30000 (30sec)<br/>Session gate - 600000 (10min)</tt>
 +
|-style="vertical-align:top;"
 +
|style="padding: 5px"|send_timeout
 +
|style="padding: 5px"|integer
 +
|style="padding: 5px"|'''Client send timeout'''<br/>
 +
Timeout to send a packet of data to client, positive timeout values are seconds, negative timeout values are microseconds, zero means no timeout.
 +
|style="padding: 5px"|<tt>0</tt>
 +
|-style="vertical-align:top;"
 +
|style="padding: 5px"|recv_timeout
 +
|style="padding: 5px"|integer
 +
|style="padding: 5px"|'''Client receive timeout'''<br/>
 +
Timeout to receive a packet of data from client, positive timeout values are seconds, negative timeout values are microseconds, zero means no timeout
 +
|style="padding: 5px"|<tt>0</tt>
 +
|-style="vertical-align:top;"
 +
|style="padding: 5px"|recv_maxsize
 +
|style="padding: 5px"|integer
 +
|style="padding: 5px"|'''Maximum length of incoming data'''<br/>
 +
Maximum message length that is permitted to be received, zero means unlimited
 +
|style="padding: 5px"|<tt>2147483647 (2GB)</tt>
 +
|-style="vertical-align:top;"
 +
|style="padding: 5px"|debug
 +
|style="padding: 5px"|integer
 +
|style="padding: 5px"|'''Debug level'''<br/>
 +
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.<br/>
 +
* <tt>0 - Emergency</tt>
 +
* <tt>1 - Alert</tt>
 +
* <tt>2 - Critical</tt>
 +
* <tt>3 - Error</tt>
 +
* <tt>4 - Warning</tt>
 +
* <tt>5 - Notice</tt>
 +
* <tt>6 - Info</tt>
 +
* <tt>7 - Full</tt>
 +
|style="padding: 5px"|<tt>3</tt>
 +
|-style="vertical-align:top;"
 +
|style="padding: 5px"|<div id="syslog"></div>syslog
 +
|style="padding: 5px"|string
 +
|style="padding: 5px"|'''URL of syslog server'''<br/>
 +
See [[i2Rest_Config#syslog|syslog]] parameter at i2Rest Config<br/><br/>
 +
If not defined - value from top-level configuration will be used
 +
|style="padding: 5px"|
 +
|-style="vertical-align:top;"
 +
|style="padding: 5px"|workers_min
 +
|style="padding: 5px"|integer
 +
|style="padding: 5px"|'''Minimum number of worker threads'''<br/>
 +
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.
 +
|style="padding: 5px"|<tt>5</tt>
 +
|-style="vertical-align:top;"
 +
|style="padding: 5px"|watermark
 +
|style="padding: 5px"|integer
 +
|style="padding: 5px"|'''High load watermark'''<br/>
 +
Number of requests waiting in queue for process by workers, after which a new worker will be started
 +
|style="padding: 5px"|<tt>0</tt>
 +
|-style="vertical-align:top;"
 +
|style="padding: 5px"|workers_max
 +
|style="padding: 5px"|integer
 +
|style="padding: 5px"|'''Maximum number of worker threads'''<br/>
 +
i2Rest will not start more than specified number of worker threads for this gate
 +
|style="padding: 5px"|<tt>50</tt>
 
|}
 
|}

Latest revision as of 15:16, 30 June 2020

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