
The HTTP Provider Service implements a specific mechanism that facilitates internal communication between the dispatcher and server parts of the service when large response messages have to be transferred. This is the Long Data Transfer (LDT) mechanism. Its main purpose is to handle the transfer of large HTTP messages from the server processes to the Java dispatcher, in a way that guarantees a reasonable consumption of dispatcher's memory resources and adequate response times. In other words, if a large response is generated by a servlet, for example, the whole amount of data is not transferred to the dispatcher at once. The Long Data Transfer mechanism transfers a smaller portion of it to the dispatcher, and then the system waits until the client reads it. After that, the next portions of the response are transferred by the LDT mechanism to the dispatcher following the same algorithm. If the client stops reading the response, then the server stops sending the remaining portions of data to the dispatcher.
The LDT mechanism has a slightly different implementation in each of the following cases:
Static LDT Mechanism
The static LDT mechanism is used to transfer static HTTP responses (that is, response messages that return static HTML pages, images, and other files) when the size of the requested file exceeds the value of the MinFileLengthForLongDataTransfer property of HTTP Provider Service. If the LDT is activated, it sends the response from the server process to the Java dispatcher as several portions. In order to send the next portion of the response data, the HTTP Provider Service on the server process must receive a callback from the Java dispatcher (the callback is sent when the client finished reading the first portion of the response).
You can control when the LDT mechanism is activated by adjusting the value of the MinFileLengthForLongDataTransfer property. If your system has extra memory resources, you can increase the value of the property, thus achieving better performance at the cost of more memory consumed.
LDT Mechanism for Dynamic Responses
The LDT mechanism for servlet/JSP responses is activated when the length of the response message exceeds the limit set by the ServletsLongDataTransferLimit property of the HTTP Provider Service. The LDT communication is performed as follows:
Based on the description of the mechanism above, two main recommendations can be derived based on the speed of the network the communication is carried over:
Use the Visual Administrator tool to configure the properties concerning LDT mechanism. Proceed as follows:
When calculating the appropriate value of the ServletsLongDataTransferTimeout property, you need to take the client connection speed into account. If it is slow, you need to consider setting a longer timeout period in addition to setting a small callback size with the ServletsLongDataTransferCallbackSizeproperty. The size of the dispatcher's buffer can also influence the timeout, as a larger amount of buffered data needs more time to be sent to the client.