Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

...

Parameter NameDescriptionDefault Value
http.nio.interest-ops-queueingDetermines whether interestOps() queueing is enabled for the I/O reactors.true

 

HTTP Sender (Client Worker) thread pool parameters

The following parameters relate to worker thread pools that are used to process responses in non-blocking HTTP transport:

Parameter NameDescriptionDefault Value
lst_t_coreTransport sender worker pool's initial thread count

Initial number of threads in the response processing worker (Client Worker) pool.

If the number of live threads is less than the value defined here, a new thread is created to process the response.

20
lst_t_maxTransport 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 - HttpClientWorker threads were in BLOCKED state during last minute

Maximum number of threads in the response processing worker (Client Worker) pool.

If the queue (lst_qlen) is full and the number of live threads is less that the value defined here, a new thread will be created to process the response.

100
lst_alive_secSender-side

The keep-alive time in seconds for idle threads in the response processing worker pool. Once this time has elapsed for an idle thread, it will be destroyed.

The purpose of this parameter is to optimize the usage of resources by avoiding wastage that results from having idle threads.

5
lst_qlen

The

sender queue length

length of the queue that is used to hold runnable tasks to be executed by the response processing worker pool.

If the number of live threads is equal to the core pool size (lst_t_core) and all threads are busy, new responses will be pushed into the queue so that they can be processed when a thread becomes available.

Note
If you need new threads to be created beyond the core pool size (lst_t_core), ensure you change the default value of this parameter so that it becomes a bounded queue

If the queue is full, all threads are busy and the number of live threads is equal to the max pool size (lst_t_max), new responses will be rejected by the response processing worker.

-1
lst_io_threadsSender-side IO workers.2

...

HTTP Listener thread pool parameters

The following parameters relate to worker thread pools that are used to process requests in non-blocking HTTP transport:

Info

Listener-side parameters should generally have the same values as the sender-side parameters.

Parameter NameDescriptionDefault Value
snd_t_coreTransport listener worker pool's initial thread count

Initial number of threads in the worker thread pool.

If the number of live threads is less than the value defined here, a new thread is created to process the request.

20
snd_t_maxTransport 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

Maximum number of threads in the request processing worker (Server Worker) pool.

If the queue (snd_qlen) is full and the number of live threads is less that the value defined here, a new thread will be created to process the request.

100
snd_alive_secListener

Keep-

side keep-

alive time in seconds for idle threads in the worker pool. Once this time has elapsed for an idle thread, it will be destroyed.

The purpose of this parameter is to optimise the usage of resources by avoiding wastage that results from having idle threads.

5
snd_qlen

The

listener queue length

length of the queue that is used to hold runnable tasks to be executed by the request processing worker pool.

If the number of live threads is equal to the core pool size (snd_t_core) and all threads are busy, new requests will be pushed into the queue so that they can be processed when a thread becomes available.

Note

If you need new threads to be created beyond the core pool size (snd_t_core), ensure you change the default value of this parameter so that it becomes a bounded queue.

If the queue is full, all threads are busy and the number of live threads is equal to the max pool size (snd_t_max), new requests will be rejected by the request processing worker.
-1
snd_io_threadsListener-side IO workers.2

Other parameters

Parameter NameDescriptionDefault Value
http.block_service_listIf 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 true,the User-Agent HTTP header of messages passing through the ESB will be preserved.

Excerpt
hiddentrue

This is added for FAQ "How can I preserve User-Agent HTTP header when passing messages through ESB?".

false

Example

The following example shows excerpts from a nhttp.properties file.

...

Info

For information on tuning performance of WSO2 ESB using these properties, see Performance Tuning.