HTTP Client Resource

There are two important tuning considerations related to the HTTP client:

  • HTTP Client Thread Pool
  • Connection Pooling

HTTP Client Thread Pool - If you are using HTTP or SOAP with HTTP Send Request or SOAP Invoke (Reference) activity, it is important to verify that the rate of request received on the HTTP server keeps up with the rate at which the client sends messages. This situation is arises when there are very high numbers of concurrent requests being made.

Each Request and Response activity that uses the HTTP protocol, for example, Send HTTP Request or SOAP Invoke is associated with a unique thread pool.

Each request is executed in a separate thread, which belongs to the thread pool associated with the activity. The number of threads in the pool determines the maximum number of concurrent requests a request or response activity can execute. This is a cached thread pool with no default value.

Alternatively, you can create a separate client thread pool and define the core and max pool values. Set the value of this property to a reasonable number for your system. If you set the value too high, it may result in extra resources being allocated that are never used.

You may want to increase the value of the max pool size. However, this value should be increased only if the client side has more backlogs compared to the receive side. It is recommended that you design a test framework that helps you monitor such behavior and determine optimal thread pool count.

Connection Pooling - In the absence of connection pooling, the client makes a call to the same server in a single threaded communication. By enabling connection pooling, multithreaded communication is enabled. Hence, by default the HTTP Client provides single threaded connection. Single threaded connection can be used for multiple sequential requests. However in cases where there are multiple concurrent requests, enabling connection pooling is required.

If connection pooling is enabled, it can improve performance as a pool of reusable shared connections will be maintained. Using the connection pooling feature you can keep the default values for the number of connections that the client establishes with the service, or tune them appropriately. The values should not be set to zero (0).

For more information, see Tuning Parameters.