uCosminexus Application Server, Web Container Functionality Guide
This subsection explains the setting of communication timeout for sending and receiving requests when the Web server integration functionality is used. The following figure shows the locations to set the communication timeout for sending and receiving requests.
Figure 4-16 Locations to set the communication timeout for sending and receiving requests
When you use the Web server integration functionality, set the communication timeout at the locations marked with a O sign in the figure. The locations to set the communication timeout are explained below. The numbers in the figure correspond to the numbers in the following explanation:
You can set the timeout period in the Web server, for receiving a request transferred from the client. You can detect the occurrence of failure in the client by using the communication timeout that was set up. You can detect the following failures:
You can set the timeout period in the redirector, for sending a request to the Web container. When the set timeout period is exceeded and a timeout occurs, a message is output to the error log of Cosminexus HTTP Server.
You can set the timeout to the following two time-periods when a request is sent by the redirector:
You can detect the occurrence of failure in the Web container or on the network using the communication timeout that was set up. You can detect the following failures:
If a request cannot be sent temporarily from the redirector, you can retry sending the request. A request might not be sent temporarily in the following cases:
You can retry establishing a connection, and sending request headers. The following figure shows the flow of retry process.
Figure 4-17 Flow of retry process when requests are sent to the Web container
Retry is executed when a timeout occurs in A or B of the figure. Retry is not executed when processing fails at C or D of the figure, and timeout occurs. The connection is closed and an error is returned to the client. Note that the failure of processing at C or D in the figure indicates failure in receiving request body from the Web server, or failure in sending request body to the Web container.
The retry operation in the case of failure in processing at A and B in the figure is explained below:
After sending a request from the redirector to the Web container for establishment of a connection, if the power supply to the host on which the Web container is running is disrupted or a network failure occurs, the operation is performed as follows:
Note that if a connection cannot be established in spite of retrying for the specified number of times, a message indicating failure in sending request is output, and an error (status code 500) is returned to the client.
After a connection is established successfully, or the request header is sent to the Web container, if the power supply to the host on which the Web container is running is disrupted and a network failure occurs, perform the operation as follows:
Note that if the request header cannot be sent in spite of retrying for the specified number of times, a message indicating failure in sending request is output, and status code 500 is returned to the client.
The following figure shows the retry operation when you use a load balancer to distribute a request:
Note that in this figure, a request is first distributed to Web container 1 and then to Web container 2, and the retry frequency is set as three times.
Figure 4-18 Retry operation when a request is distributed using a load balancer
The retry operation shown in the figure is as follows:
You can set a timeout period in the Web container, for receiving a request transferred from the redirector. You can detect the occurrence of failure in the redirector using the communication timeout that was set up. You can detect the following failures:
The following table describes the conditions for occurrence of communication timeout and the operations after the timeout occurs.
Table 4-13 Conditions for occurrence of communication timeout and the operations after occurrence
Conditions for occurrence of communication timeout | Operations after occurrence |
---|---|
In the case all the following conditions are satisfied when a request is received:
|
|
In the case all the following conditions are satisfied when using API# in the servlet (JSP):
|
|
In the case all the following conditions are satisfied when POST data is read by using the java.io.BufferedReader class acquired by getReader method of javax.servlet.ServletRequest class or javax.servlet.ServletInputStream class in the servlet (JSP):
|
|
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.