This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Configuring passthru-http.properties
The <PRODUCT_HOME>/conf/passthru-http.properties
file contains tuning parameters related to the HTTP Pass Through transport. This is the default transport of the ESB profile since it optimizes the performance of the ESB profile in most scenarios. The performance can be further optimized when this transport is used with header based routing or smaller sized messages.
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.
Pass-through HTTP transport specific tuning parameters
Parameter Name | Description | Default Value |
---|---|---|
worker_pool_size_core | Initial number of threads in the worker pool. If the number of live threads is less than the value defined here, a new thread is created to process the response. | 400 |
worker_pool_size_max | Maximum number of threads in the worker pool. If the queue ( | 500 |
http.socket.timeout | Maximum period of inactivity between two consecutive data packets. Given in milliseconds. | 180000 |
worker_thread_keepalive_sec | The 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 optimize the usage of resources by avoiding wastage that results from having idle threads. | 60 |
worker_pool_queue_length | The length of the queue that is used to hold runnable tasks to be executed by the worker pool. If the number of live threads is equal to the core pool size ( If you need new threads to be created beyond the core pool size ( If the queue is full, all threads are busy and the number of live threads is equal to the max pool size ( | -1 |
io_threads_per_reactor | Defines the number of IO dispatcher threads used per reactor. The value for this property should not exceed the number of cores in the server. | 2 |
io_buffer_size | Size in bytes of the buffer through which data passes. | 16384 |
http.max.connection.per.host.port | Defines the maximum number of connections allowed per host port. | 32767 |
http.socket.reuseaddr | If this parameter is set to true , it is possible to open another socket on the same port as that of the socket which is currently used by the ESB server to listen to connections. This is useful when recovering from a crash. On such occasions, if the socket is not properly closed, a new socket can be opened in order to continue with the listening. | true |
http.socket.buffer-size | This is used to configure the | 8192 |
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 accessed from the http(s):<esb>:8280/services/ URL. | true |
http.origin-server | This parameter is used to customize the name of the origin server in the HTTP response header. | |
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 and printed in the outgoing message. | false |
http.server.preserve | If this parameter is set to true, Server HTTP header of messages passing through the ESB will be preserved and printed in the outgoing message. | false |
http.connection.disable.keepalive | If this parameter is set to true , the HTTP connections with the back end service will be closed soon after the request is served. It is recommended to set this property to false so that the ESB does not have to create a new connection every time it sends a request to a back end service. However, you may need to close connections after they are used if the back end service does not provide sufficient support for keep alive connections. | false |
rest.dispatcher.service | This parameter determines how requests from clients to the ESB are dispatched to the REST APIs of the ESB. The MultitenantDispatcherService which is selected by default for this parameter dispatches requests from multiple clients at a given time. | MultitenantDispatcherService |
Example
The following example shows excerpts from a passthru-http.properties file.
## This file contains the configuration parameters used by the Pass-through HTTP transport ## Pass-through HTTP transport specific tuning parameters worker_pool_size_core=400 worker_pool_size_max=500 #worker_thread_keepalive_sec=60 #worker_pool_queue_length=-1 #io_threads_per_reactor=2 io_buffer_size=16384 #http.max.connection.per.host.port=32767 # This property is crucial for automated tests http.socket.reuseaddr=true ## Other parameters http.block_service_list=true #http.user.agent.preserve=false #http.server.preserve=true #http.connection.disable.keepalive=false rest.dispatcher.service=__MultitenantDispatcherService