tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Yates" <>
Subject http/1.1 pipelined request processing order
Date Mon, 02 Dec 2002 00:35:22 GMT
Hi all,

>From some testing I have done it appears Tomcat ensures that pipelined
requests (HTTP/1.1) are handled in order by only handing off request #2
after request #1 has completely finished processing. This adds quite a delay
in processing a sequence of lengthy requests.

Say 2 requests arrive in a HTTP/1.1 pipeline very close together. And each
request takes 10 seconds to process.
The behavior I have seen is that:
* Request 1 is handed to the servlet and allowed to process 
* Response 1 is written out on the wire
* Request 2 is handed to the servlet to process
* Response 2 is written out on the wire.

This takes a total of just over 20 seconds. 

However if the client had NOT used pipelining (which should be more
efficient) and opened two connections to the server then request 1 and
request 2 would have both been processed in a total (start to end time) over
just over 10 seconds - although using more sockets and more packets.

Is there a way Tomcat can be configured whereby as soon as requests arrive
they are handed to the servlet for processing? (Obviously as separate

Has anyone written any custom code to ensure the responses going back out on
the wire are in the same order as the requests coming in (as is required in

If this functionality isn't currently implemented in Tomcat 4 where would be
the best place (in the code) to go about adding this for our custom


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message