The <ESB_Home>/repository/conf/synapse.properties
file contains tuning parameters relating to the mediation engine. These parameters are mainly used when mediators such as Iterate
and Clone
which leverage on internal thread pools are used.
The following table explains the parameters included in the synapse.properties
file.
Parameter Name | Description | Default Value |
---|---|---|
synapse.threads.core | The initial number of synapse threads in the pool. This parameter is applicable only if the Iterate or the Clone mediator is used to handle a higher load. The number of threads specified for this parameter should be increased as required to balance an increased load. | 20 |
synapse.threads.max | The maximum number of synapse threads in the pool. This parameter is applicable only if the Iterate or the Clone mediator is used to handle a higher load. The number of threads specified for this parameter should be increased as required to balance an increased load. | 100 |
synapse.threads.keepalive | The keep-alive time for extra threads defined in milliseconds. This parameter is applicable only if the Iterate or the Clone mediator is used to handle a higher load. The number of threads specified for this parameter should be increased as required to balance an increased load. | 5 |
synapse.threads.qlen | The length of the queue that is used to hold the runnable tasks to be executed by the pool. This parameter is applicable only if the Iterate or the Clone mediator is used to handle a higher load. The number of threads specified for this parameter should be increased as required to balance an increased load. | 10 |
synapse.threads.group | The name of the thread group. | synapse-thread-group |
synapse.threads.idprefix | The prefix of each thread name. | SynapseWorker |
synapse.sal.endpoints.session.timeout.default | The session time-out time for the session aware load balance endpoint given in milliseconds. | 600000 |
| The maximum number of milliseconds within which a response for the request should be received. A response which arrives after the specified number of seconds cannot be correlated with the request. Hence, a warning all be logged and the request will be dropped. This parameter is also referred to as the time-out handler | 120000 |
statistics.clean.enable | If this parameter is set to true , all the existing statistics would be cleared before processing a request. This is recommended if you want to increase the processing speed. | false |
synapse.xpath.dom.failover.enabled | If this parameter is set to true , it will be possible for ESB to switch to xpath 2.0. The default value for this parameter is false since xpath 2.0 evaluations can cause performance degradation. | false |
synapse.timeout_handler_interval | The back end service to which a request has been sent are repeatedly called back for responses at time intervals specified for this parameter. Any endpoints have timed out are identified during these time intervals, and they are no longer called back. Note that specifying a lower value for this parameter results in a higher overhead on the system. | 15 (seconds) |
Compared to NHTTP properties, it is necessary to have an equal or higher number of threads in the <ESB_HOME>/repository/conf/synapse.properties
file to balance out the load as shown in the example below.
If the NHTTP properties are as follows:
snd_t_core=100 #snd_t_max=250 snd_io_threads=5 lst_t_core=100 #lst_t_max=250 lst_io_threads=5 http.socket.timeout=60000 #http.connection.disable.keepalive=1
A reasonable setting for synapse properties would be as follows:
ynapse.threads.core=100 synapse.threads.max=250 synapse.threads.keepalive=5 synapse.threads.qlen=1000 synapse.threads.group=synapse-thread-group synapse.threads.idprefix=SynapseWorker
For information on tuning performance of WSO2 ESB using these properties, see Performance Tuning.