The <ESB_HOME>/repository/conf/nhttp.properties
file contains tuning parameters related to HTTP-NIO Transport. These parameters can be modified as required based on your production environment. This information is provided as a reference for users who are already familiar with the product features and want to know how to configure them.
Parameters used by non-blocking HTTP-NIO transport
Parameter Name | Description | Default Value |
---|---|---|
http.socket.timeout.receiver | Maximum period of inactivity between two consecutive data packets for the transport listener side. This is the socket timeout value for connection between the client and the ESB server. The value is given in milliseconds. | 60000 |
http.socket.timeout.sender | Maximum period of inactivity between two consecutive data packets for the transport sender side. This is the socket timeout value for connection between the ESB server and the backend server. The value is given in milliseconds. | 60000 |
nhttp_buffer_size | The size of the buffer through which data passes when receiving/transmitting NHTTP requests. This is given in bytes. | 8192 |
http.tcp.nodelay | This determines whether Nagle's algorithm (for improving the efficiency of TCP/IP by reducing the number of packets sent over the network) is used. Value 0 is used to enable this algorithm and value 1 is used to disable it. The algorithm should be enabled if you need to reduce bandwidth consumption. | 1 |
http.connection.stalecheck | This determines whether stale connection check is used. Value 0 is used to enable stale connection check and value 1 is used to disable it. When this parameter is enabled, connections which are no longer used will be identified and disabled before each request execution. Stale connection check should be disabled when performing critical operations. | 0 |
Properties for AIX based deployment
Parameter Name | Description | Default Value |
---|---|---|
http.nio.interest-ops-queueing | Determines whether interestOps() queueing is enabled for the I/O reactors. | true |
HTTP Sender thread pool parameters
Parameter Name | Description | Default Value |
---|---|---|
lst_t_core | Transport sender worker pool's initial thread count. | 20 |
lst_t_max | Transport sender worker pool's maximum thread count. Once this limit is reached and all the threads in the pool are busy, they will be in a BLOCKED state. In such situations an increase in the number of messages would fire the error SYSTEM ALERT - HttpServerWorker threads were in BLOCKED state during last minute . | 100 |
lst_alive_sec | Sender-side keep-alive seconds. | 5 |
lst_qlen | The sender queue length. | -1 |
lst_io_threads | Sender-side IO workers. | 2 |
When there is an increased load, it is recommended to increase the number of threads mentioned in the parameters above to balance it.
HTTP Listener thread pool parameters
Listener-side parameters should generally have the same values as the sender-side parameters.
Parameter Name | Description | Default Value |
---|---|---|
snd_t_core | Transport listener worker pool's initial thread count. | 20 |
snd_t_max | Transport listener worker pool's maximum thread count. Once this limit is reached and all the threads in the pool are busy, they will be in a BLOCKED state. In such situations an increase in the number of messages would fire the error SYSTEM ALERT - HttpServerWorker threads were in BLOCKED state during last minute . | 100 |
snd_alive_sec | Listener-side keep-alive seconds. | 5 |
snd_qlen | The listener queue length. | -1 |
snd_io_threads | Listener-side IO workers. | 2 |
Other parameters
Parameter Name | Description | Default Value |
---|---|---|
http.block_service_list | If this parameter is set to true , all the services deployed to the WSO2 ESB cannot be viewed from the http(s):<esb>:8280/services/ URL. | false |
http.user.agent.preserve | If this parameter is set to | false |
Example
The following example shows excerpts from a nhttp.properties
file.
# # http://www.apache.org/licenses/LICENSE-2.0 # # This file contains the configuration parameters used by the Non-blocking HTTP transport #http.socket.timeout=60000 #nhttp_buffer_size=8192 #http.tcp.nodelay=1 #http.connection.stalecheck=0 # Uncomment the following property for an AIX based deployment #http.nio.interest-ops-queueing=true # HTTP Listener thread pool parameters #snd_t_core=20 #snd_t_max=100 #snd_alive_sec=5 #snd_qlen=-1 #snd_io_threads=2 # HTTP Sender thread pool parameters #lst_t_core=20 #lst_t_max=100 #lst_alive_sec=5 #lst_qlen=-1 #lst_io_threads=2 nhttp.rest.dispatcher.service=__MultitenantDispatcherService # URI configurations that determine if it requires custom rest dispatcher rest_uri_api_regex=\\w+://.+:\\d+/t/.*|\\w+://.+\\w+/t/.*|^(/t/).* rest_uri_proxy_regex=\\w+://.+:\\d+/services/t/.*|\\w+://.+\\w+/services/t/.*|^(/services/t/).*