Thread management and configuration considerations

Depending on the work load in your environment, you can tune SOAP Gateway to maximize performance and throughput of the callout processing by configuring the SOAP Gateway callout properties.

Important: You must fully understand your requirements and fine-tune these properties appropriately to suit your needs in order to achieve maximum performance benefit out of these features. Inadvertent usage of these properties without fully understanding their implications could lead to poor performance.

If the thread pool is stopped or the worker threads become nonexistent, when callout threads are pulling messages, the messages will not be processed and eventually the callout threads stop or continue, depending on the stopOnThreadError property setting. If you have too few worker threads in the thread pool and many callout requests, there might be delay in servicing the callout requests. You might need to increase the number of worker threads in the thread pool. If there are fewer callout requests and too many worker threads, some worker threads might be idle in the thread pool. In this case, you might want to reduce the number of worker threads in the thread pool appropriately.

When the queue throttle length (specified in the queueThrottleLength property) is reached, the callout threads would temporarily pause so that the worker threads could catch up. This situation occurs if the worker threads are too slow, or if there are too few worker threads to process the jobs while there are too many callout threads or messages.

You can also slow down the process of callout requests retrieval by increasing the poll interval, so the worker threads would have the chance to empty the work queue. The ideal configuration for your environment is that the volume of the callout messages that are processed by the callout threads is balanced with the volume of the request processing by the worker threads. In other words, the worker threads need to consume or drain the worker queue as fast as the callout threads place callout requests in the queue. If the workers cannot catch up with the speed of the callout threads because the workers are too slow or the number of workers is too few, the work queue will gradually reach its maximum capacity. In such a situation, the callout threads will pause temporarily. As the worker threads keep draining the work queue, the callout threads will resume operation normally and will be able to add jobs to the work queue.

Tips:
  • Monitor the work queue to ensure that the callout work queue is drained well. If the queue reaches its full capacity quickly or often, one option is to configure SOAP Gateway to have more worker threads, or set a slightly larger rtPollInterval property value so the callout messages are not pulled too quickly.
  • The messages in the work queue (in-flight messages) are not persistent, and therefore are not recoverable when the server restarts. The draining of the in-flight messages is handled based on whether the thread pool is stopped gracefully or forced (with the -force option). Follow the following general steps when changing the SOAP Gateway callout properties or when stopping the SOAP Gateway server.

General steps to update a callout property

When you need to change any SOAP Gateway callout properties, it is better to stop the thread pool to ensure that no in-flight messages are being processed, and to avoid any undesirable results.
  1. Stop the callout threads.
  2. Stop the thread pool.
  3. Update the callout properties.
  4. Start the thread pool.
  5. Start the callout threads.