uCosminexus Application Server, Web Container Functionality Guide

[Contents][Glossary][Index][Back][Next]

2.17.6 Example of setting the number of concurrently executing threads and the size of a pending queue (Web application)

This subsection describes the examples for setting up the number of concurrently executing threads and the size of pending queues of Web applications. The examples explained here refer to the Web applications in which the Web server integration functionality is used.

Organization of this subsection
(1) Example of setting the Web applications used in the description
(2) Number of threads available in each Web application

(1) Example of setting the Web applications used in the description

In this example, the setting to control the number of concurrently executing threads in Web application is specified in two Web applications out of the four Web applications deployed on the Web container. The settings are shown below:

The following figure illustrates the example in which the Web application with the setting to control the number of concurrently executing threads for each Web application, and Web applications without the setting exist together on a Web container:

Figure 2-21 Example of Web application settings

[Figure]

(2) Number of threads available in each Web application

The maximum number of concurrently executing threads, the number of dedicated threads, and the size of the pending queue that you can use in the case of the setup in figure 2-21 are illustrated below for each Web application. Note that the serial number of the description corresponds to the serial number mentioned in the figure.

  1. Web application A
    • Maximum number of concurrently executing threads and the number of dedicated threads
      Since the maximum number of concurrently executing threads and the number of dedicated threads is set in Web application A, you can use the threads up to the respective set values.
      You can concurrently execute maximum of 3 threads in the Web application A. Out of the three threads you can secure minimum of one thread for the number of dedicated threads in Web application A.
    • Size of the pending queue of the Web application
      The size of the pending queue of the Web application is specified in the Web application A. If three threads are used concurrently in the Web application A, a maximum of five requests to the Web application A are accumulated in the queue.
  2. Web application B
    • Maximum number of concurrently executing threads and the number of dedicated threads
      Since the maximum number of concurrently executing threads and the number of dedicated threads is set in Web application B, you can use the threads up to the respective set values.
      You can concurrently execute maximum of 3 threads in the Web application B. Out of the three threads, you can secure minimum of two threads for the number of dedicated threads in Web application B.
    • Size of the pending queue of the Web application
      The size of the pending queue of the Web application is specified in the Web application B. If three threads are used concurrently in the Web application B, a maximum of ten requests to the Web application B are accumulated in the queue.
  3. Web application C and Web application D
    The setting to control the concurrently executing threads in the Web application is not specified in Web application C and Web application D.
    Perform the operation as follows:
    • Maximum number of concurrently executing threads
      In Web application C and Web application D, use the number of shared threads of the Web container. In this case, since the number of shared threads of the Web container is seven, you can use maximum up to seven threads together in Web application C and Web application D.
      Note that the number of threads is shared between Web application C and Web application D.
      In Web application 3 and Web application 4, since the setting to control the number of concurrently executing threads is not specified, there are no dedicated threads. When the access is centralized in Web application A and Web application B, and no threads are available, the processing of Web application C and Web application D is pending.
    • Size of default pending queue
      When the processing of the Web application C or the Web application D is pending, the requests to these Web applications are accumulated in the pending queue. The size of the pending queue is not specified for the Web application C and the Web application D, and therefore, the requests are accumulated in the default pending queue. A maximum of ten requests are accumulated in the pending queue.
      Reference note
      In a Web container, the threads are even used for error processing of static contents and requests. The number of threads used for these objectives can be calculated from the following expression:

      Number-of-processing-threads-of-Web-server - (Maximum-number-of-concurrently-executing-threads-of-Web-container + Total-size-of-the-pending-queues#)
      # The total size of the pending queues refers to the value obtained by adding the size of the pending queues of the Web container, Web application A and Web application B, in this figure.
      Therefore, in the case of this figure, the value will be 50 - (10 + (10 + 5 + 10) ) implying that 15 threads are used for error processing of static contents and requests.