uCosminexus Application Server, Web Container Functionality Guide

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

2.19.3 Operations of a Web application when the number of concurrently executing threads are changed dynamically

This subsection describes the operations of a Web application when the maximum number of concurrently executing threads of a Web application is changed dynamically.

Organization of this subsection
(1) Operations when the maximum number of concurrently executing threads is changed
(2) Operations when the number of dedicated threads is changed
(3) Operations when the size of the pending queue of a Web application is changed

(1) Operations when the maximum number of concurrently executing threads is changed

When the maximum number of concurrently executing threads is changed, the Web application runs as follows:

When the maximum number of concurrently executing threads is increased
Among the pending requests of the Web application, the executable requests are executed immediately.
For example, when the number of maximum concurrently executing threads is changed from 7 to 8 due to the changes in the settings, if there are any requests in the pending queue of the Web application, one request from the pending queue is immediately executed.

When the maximum number of concurrently executing threads is decreased
The maximum number of concurrently executable threads is decreased.
However, if you attempt to change the settings when all the threads of the maximum number of concurrently executing threads are being used, the threads exceeding the maximum number of concurrently executing threads are executed temporarily, since the number of running threads cannot be decreased.
For example, when the maximum number of concurrently executing threads is changed from 8 to 7 by changing the settings, and if 8 threads are in use at that time, temporarily the 8th thread that exceeds the maximum number of concurrently executing threads after change in settings will be executed.
If one of the active threads ends, the number of threads is decreased and thereafter threads are executed according to the set value, i.e. maximum 7 threads are executed concurrently as per the settings.

(2) Operations when the number of dedicated threads is changed

When the number of dedicated threads is changed, a Web application runs as follows:

When the number of dedicated threads is increased
Among the pending requests of the Web application, the executable requests are executed immediately with the increase in the number of dedicated threads of the corresponding Web application.
Moreover, when access is in peak and all the threads set in the maximum number of concurrently executing threads of each Web container are in use, and if the number of dedicated threads of a specific Web application is increased, the requests that are in the pending queue of that Web application are executed immediately. As a result, the number of threads exceeding the maximum number of concurrently executing threads of each Web container is executed temporarily.
For example, if the maximum number of concurrently executing threads of each Web container is 10, and the number of threads used in WebAP1 and WebAP2 of the Web application is 7 and 3 respectively, if the number of dedicated threads of WebAP1 is changed to 8, 11 threads are executed temporarily in each Web container.

When the number of dedicated threads is decreased
On decreasing the number of dedicated threads of a specific Web application, the number of shared threads in each Web container is increased. Among the requests of the Web application, URL group, and default pending queue, if there are any threads that can be executed, they are executed immediately on increasing the number of shared threads from the requests in the pending queue.

(3) Operations when the size of the pending queue of a Web application is changed

When the size of the pending queue of a Web application is changed, the Web application runs as follows:

When the size of the pending queue of the Web application is increased
The size of the pending queue of the Web application is increased immediately.

When the size of the pending queue of the Web application is decreased
When the size of the pending queue of the Web application is changed to a value smaller than the number of requests waiting in the pending queue of the Web application, the request exceeding the pending queue size is returned as an HTTP 503 error.