This section contains detailed NeoFS REST Gateway configuration file description
including default config values and some tips to set up configurable values.
There are some custom types used for brevity:
duration -- string consisting of a number and a suffix. Suffix examples include s (seconds), m (minutes), ms (
milliseconds).
The listeners to enable, this can be repeated and defaults to the schemes in the swagger spec.
cleanup-timeout
duration
10s
Grace period for which to wait before killing idle connections.
graceful-timeout
duration
15s
Grace period for which to wait before shutting down the server.
max-header-size
int
1000000
Controls the maximum number of bytes the server will read parsing the request header's keys and values, including the request line. It does not limit the size of the request body.
listen-address
string
localhost:8080
The IP and port to listen on.
listen-limit
int
0
Limit the number of outstanding requests. 0 means no limit
keep-alive
duration
3m
Sets the TCP keep-alive timeouts on accepted connections.
read-timeout
duration
30s
Maximum duration before timing out read of the request. It prunes dead TCP connections (e.g. closing laptop mid-download).
write-timeout
duration
30s
Maximum duration before timing out write of the response.
tls-listen-address
string
localhost:8081
The IP and port to listen on for TLS.
tls-certificate
string
The certificate file to use for secure connections.
tls-key
string
The private key file to use for secure connections (without passphrase).
tls-ca
string
The certificate authority certificate file to be used with mutual tls auth.
tls-listen-limit
int
0
Limit the number of outstanding requests for TLS. 0 means no limit
tls-keep-alive
duration
3m
Sets the TCP keep-alive timeouts on accepted connections for TLS.
tls-read-timeout
duration
30s
Maximum duration before timing out read of the request for TLS. It prunes dead TCP connections (e.g. closing laptop mid-download).
tls-write-timeout
duration
30s
Maximum duration before timing out write of the response for TLS.
Account address to get from wallet. If omitted default one will be used.
passphrase
string
Passphrase to decrypt wallet.
pool section
pool:node-dial-timeout:10shealthcheck-timeout:15srebalance-timer:60serror-threshold:100# Nodes configuration# This configuration makes the gateway use the first node (node1.neofs:8080)# while it's healthy. Otherwise, gateway uses the second node (node2.neofs:8080)# for 10% of requests and the third node (node3.neofs:8080) for 90% of requests.# Until nodes with the same priority level are healthy# nodes with other priority are not used.# The lower the value, the higher the priority.peers:0:address:node1.neofs:8080priority:1weight:11:address:node2.neofs:8080priority:2weight:0.12:address:node3.neofs:8080priority:2weight:0.9
Parameter
Type
Default value
Description
node-dial-timeout
duration
10s
Timeout to connect to a node.
healthcheck-timeout
duration
15s
Timeout to check node health during rebalance.
rebalance-timer
duration
60s
Interval to check node health.
error-threshold
uint32
100
The number of errors on connection after which node is considered as unhealthy.
peers section
Parameter
Type
Default value
Description
address
string
Address of storage node.
priority
int
1
It allows to group nodes and don't switch group until all nodes with the same priority will be unhealthy. The lower the value, the higher the priority.
weight
float
1
Weight of node in the group with the same priority. Distribute requests to nodes proportionally to these values.