Home

Awesome

Gitter chat Issue Tracker CI status Tag Maven metadata URL Sonatype Nexus (Releases) Docker Pulls

Netty-based Storage Driver

Netty uses its own I/O worker thread pool. The count of these threads is controlled by the storage-driver-threads configuration option. However the connection pool allows to keep much more open connections at any moment of time. The count of the open connections may be limited by storage-driver-limit-concurrency configuration option.

1. Configuration Reference

NameTypeDefault ValueDescription
storage-net-node-addrsList of strings127.0.0.1The list of the storage node IPs or hostnames to use for HTTP load. May include port numbers.
storage-net-node-connAttemptsLimitInteger >= 00The limit for the subsequent connection attempts for each storage endpoint node. The node is excluded from the connection pool forever if the node has more subsequent connection failures. The default value (0) means no limit.
storage-net-node-portInteger > 07The common port number to access the storage nodes, may be overriden adding the port number to the storage-driver-addrs, for example: "127.0.0.1:9020,127.0.0.1:9022,..."
storage-net-node-sliceFlagfalseSlice the storage node addresses between the mongoose nodes using the greatest common divisor or not
storage-net-bindBacklogSizeInteger >= 00
storage-net-interestOpQueuedFlagfalse
storage-net-keepAliveFlagtrue
storage-net-lingerInteger >= 00
storage-net-reuseAddrFlagtrue
storage-net-rcvBufFixed size >= 00The network connection input buffer size. Estimated automatically if 0 (default)
storage-net-sndBufFixed size >= 00The network connection output buffer size. Estimated automatically if 0 (default)
storage-net-selectIntervalInteger > 0100
storage-net-tcpNoDelayFlagtrue
storage-net-timeoutMilliSecInteger >= 01000000The socket timeout
storage-net-ioRatio0 < Integer < 10050Internal Netty's I/O ratio parameter. It's recommended to make it higher for large request/response payload (>1MB)
storage-net-transportEnumnioThe I/O transport to use (see the details). By default tries to use "nio" (the most compatible). For Linux try to use "epoll" or "iouring", for MacOS/BSD use "kqueue" (requires rebuilding).
storage-net-ssl-ciphersList of stringsnullThe list of ciphers to use if SSL is enabled. First cipher in the list that matches is applied. Make sure to match used ciphers and protocols.
storage-net-ssl-enabledFlagfalseThe flag to enable the load through SSL/TLS. Currently only HTTPS implementation is available. Have no effect if configured storage type is filesystem.
storage-net-ssl-protocolsList of stringsTLSv1.1, TLSv1.2The list of secure protocols to use if SSL is enabled
storage-net-ssl-providerStringOPENSSLThe SSL provider. May be "OPENSSL" (better performance) or "JDK" (fallback)
storage-net-writeSpinCountInteger1Maximum loop count for a write operation until WritableByteChannel.write(ByteBuffer) returns a non-zero value.

2. Node Balancing

Mongoose uses the round-robin way to distribute I/O tasks if multiple storage endpoints are used. Mongoose will try to distribute the active connections equally among the endpoints if a connection fails.

3. SSL/TLS

java -jar mongoose-<VERSION>.jar \
    --storage-net-ssl-enabled \
    --storage-net-node-port=9021 \
    ...

4. Connection Timeout

java -jar mongoose-<VERSION>.jar \
    --storage-net-timeoutMillisec=100000 \
    ...

5. I/O Buffer Size

Mongoose automatically adopts the input and output buffer sizes depending on the step info. For example, for create I/O type the input buffer size is set to the minimal value (4KB) and the output buffer size is set to configured data item size (if any). If read I/O type is used the behavior is right opposite - specific input buffer size and minimal output buffer size. This improves the I/O performance significantly. But users may set the buffer sizes manually.

Example: setting the input buffer to 100KB:

java -jar mongoose-<VERSION>.jar \
    --storage-net-rcvBuf=100KB \
    ...

Example: setting the output buffer to 10MB:

java -jar mongoose-<VERSION>.jar \
    --storage-net-sndBuf=10MB \
    ...