Tuning the HTTP Transport

See the following topics to tune the HTTP PassThrough transport:

Tuning non-blocking invocations

You can improve performance of your non-blocking invocations by configuring the following parameters related to the HTTP Pass Through transport in the deployment.toml file (stored in the MI_HOME/conf directory):

[transport.http]
socket_timeout = 180000
core_worker_pool_size = 400
max_worker_pool_size = 400
worker_pool_queue_length = -1
io_buffer_size = 16384
max_http_connection_per_host_port = 32767
preserve_http_user_agent = false
preserve_http_headers = ["Content-Type"]
See the descriptions of these parameters.

Tuning blocking invocations

The Callout mediator as well as the Call mediator in blocking mode uses the axis2 CommonsHTTPTransportSender internally to invoke services. It uses the MultiThreadedHttpConnectionManager to handle connections, but by default it only allows two simultaneous connections per host. So if there are more than two requests per host, the requests have to wait until a connection is available. Therefore if the backend service is slow, many requests have to wait until a connection is available from the MultiThreadedHttpConnectionManager. This can lead to a significant degrade in the performance of ESB Micro Integrator.

In order to overcome this issue, setting the defaultMaxConnectionsPerHost parameter to 100 in the deployment.toml file (stored in the MI_HOME/conf directory).

[transport.blocking.http]
sender.enable_client_caching = true
sender.transfer_encoding = "chunked"
sender.default_connections_per_host = 100

See the descriptions of these parameters.

Top