HTTP Read / Write buffer : This can controlled via following configuration parameters in your configuration files.
Parameter Name | Description | Default Value |
---|---|---|
netty.tcp.server.backlog | The maximum queue length for incoming connection indications (a request to connect) is set to the backlog parameter. If a connection indication arrives when the queue is full, the connection is refused. | 8192 |
netty.tcp.server.tcpNoDelay | The value of this socket option is a | true |
netty.tcp.server.sendBufferSize | Set a hint the size of the underlying buffers for outgoing network I/O. | 1048576 |
netty.tcp.server.receiveBufferSize.max | Maximum number of bytes to receive over a TCP connection | 1048576 |
netty.tcp.server.receiveBufferSize.min | Minimum number of bytes to receive over a TCP connection | 64 |
netty.tcp.server.receiveTotalSize.max | Total size in bytes to receive over a TCP connection | 1048576 |
netty.tcp.server.receiveBufferSize.def | Default size in bytes to receive over a TCP connection | 65536 |
netty.tcp.server.writeBufferLowWaterMark | Sets the low water mark of the write buffer. Once the number of bytes queued in the write buffer exceeded the high water mark and then dropped down below this value, Channel.isWritable() will return true again. | 32768 |
netty.tcp.server.writeBufferHighWaterMark | Sets the high water mark of the write buffer. If the number of bytes queued in the write buffer exceeds this value, Channel.isWritable() will start to return false . | 131072 |
Example: Here is the configuration setting to receive large data value over HTTP (2MB)
Sample Write Buffer Setting
<netty.tcp.server.receiveTotalSize.max>3048576</netty.tcp.server.receiveTotalSize.max> <netty.tcp.server.receiveBufferSize.max>2048576</netty.tcp.server.receiveBufferSize.max> <netty.tcp.server.receiveBufferSize.min>64</netty.tcp.server.receiveBufferSize.min> <netty.tcp.server.receiveBufferSize.def>65536</netty.tcp.server.receiveBufferSize.def> <netty.tcp.server.writeBufferLowWaterMark>32768</netty.tcp.server.writeBufferLowWaterMark> <netty.tcp.server.writeBufferHighWaterMark>3048576</netty.tcp.server.writeBufferHighWaterMark>>