tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 4120] New: - Tomcat sends an HTTP reply in 2 IP packets (slow)
Date Fri, 12 Oct 2001 12:27:14 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4120>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4120

Tomcat sends an HTTP reply in 2 IP packets (slow)

           Summary: Tomcat sends an HTTP reply in 2 IP packets (slow)
           Product: Tomcat 4
           Version: 4.0 Final
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: wille@loverbek.de


Tomcat sends the HTTP reply in two separate IP packets. 
The HTTP header goes in one IP packet, and the message
body goes in a second packet. This causes the client
to send separate ACK packets for the header and the body.

By sending header and body in a single packet, Tomcat
could probably perform better. 

This is what happens according to my Etheral dump:

Tomcat                     Client
------                     ------

HTTP-Header       --->
                 <---       ACK
Message-Body      --->      
                 <---       ACK

After sending the header, the operating system waits for a TCP ACK 
before sending the body. I think this is causes by TCP's Nagle algorithm.
By sending both header and body in a single 'write()', Tomcat can
resolve the problem and go much faster.

Mime
View raw message