You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Bill Stoddard <bi...@wstoddard.com> on 2001/03/21 22:29:52 UTC

Piplined requests in HTTP/1.1

Are pipelined requests really used?   The requirement that responses be sent
back in the order the request was received -really- sucks wind.

Bill (who is no fan of pipelined requests)


Re: Piplined requests in HTTP/1.1

Posted by Frank Griffin <ft...@ntplx.net>.
Bill Stoddard wrote:

> Are pipelined requests really used?   The requirement that responses be sent
> back in the order the request was received -really- sucks wind.

It's a pain, but it makes sense given that there is no header which would
identify the request to which a response corresponds (there should have been, I
think).

Anyway, I'm having to implement this in a proprietary comm server at the moment,
so I'll add my two cents.  I was planning on giving each request its own
sequence number and output queue, and as requests completed, I was going to
queue them in sequence.   The routine which adds a finished request would then
check the last response sequence number sent (starts at zero), and if the
response at the top of the queue had the next number in line, its output would
get shipped and it would be removed from the queue; this would continue until
the response at the top of the queue was not the next in sequence, at which
point things would be left until the next response got added to the queue, at
which point we'd check again.




Re: Piplined requests in HTTP/1.1

Posted by "Roy T. Fielding" <fi...@ebuilt.com>.
Opera uses W3C libwww, which uses pipelined requests to get most of
its performance improvements.

....Roy


Re: Piplined requests in HTTP/1.1

Posted by Jeff Trawick <tr...@bellsouth.net>.
"Bill Stoddard" <bi...@wstoddard.com> writes:

> Are pipelined requests really used?   The requirement that responses be sent
> back in the order the request was received -really- sucks wind.

In one of the problems Greg and I were debugging, there were pipelined
requests.  Here are the four buffers we read from the network before
we bit the big one.  In a couple of cases it is clear that we received
request n+1 from the client before responding to request n.

# network buffers received for core.39
#
"GET /resources/right.gif HTTP/1.1\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 5.01  [en]\r\nHost: xml.apache.org\r\nAccept: text/html, image/png, image/jpeg, image/gif, image/x-xbitmap, */*\r\nAccept-Language: en\r\nAccept-Encoding: deflate, gzip, x-gzip, identity, *;q=0\r\nReferer: http://xml.apache.org/\r\nConnection: Keep-Alive, TE\r\nTE: deflate, gzip, chunked, identity, trailers\r\n\r\n"
#--------------------------------
"GET /resources/button-asf-lo.gif HTTP/1.1\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 5.01  [en]\r\nHost: xml.apache.org\r\nAccept: text/html, image/png, image/jpeg, image/gif, image/x-xbitmap, */*\r\nAccept-Language: en\r\nAccept-Encoding: deflate, gzip, x-gzip, identity, *;q=0\r\nReferer: http://xml.apache.org/\r\nConnection: Keep-Alive, TE\r\nTE: deflate, gzip, chunked, identity, trailers\r\n\r\nGET /graphics/news-label-3.jpg HTTP/1.1\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 5.01  [en]\r\nHost: xml.ap"
#--------------------------------
"ache.org\r\nAccept: text/html, image/png, image/jpeg, image/gif, image/x-xbitmap, */*\r\nAccept-Language: en\r\nAccept-Encoding: deflate, gzip, x-gzip, identity, *;q=0\r\nReferer: http://xml.apache.org/\r\nConnection: Keep-Alive, TE\r\nTE: deflate, gzip, chunked, identity, trailers\r\n\r\nGET /graphics/ext-22-label-3.jpg HTTP/1.1\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 5.01  [en]\r\nHost: xml.apache.org\r\nAccept: text/html, image/png, image/jpeg, image/gif, image/x-xbitmap, */*\r\nAccept-Language: en\r\nAccept-Encoding: deflate"
#----------------------------------
", gzip, x-gzip, identity, *;q=0\r\nReferer: http://xml.apache.org/\r\nConnection: Keep-Alive, TE\r\nTE: deflate, gzip, chunked, identity, trailers\r\n\r\nGET /graphics/ext-30-label-3.jpg HTTP/1.1\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 5.01  [en]\r\nHost: xml.apache.org\r\nAccept: text/html, image/png, image/jpeg, image/gif, image/x-xbitmap, */*\r\nAccept-Language: en\r\nAccept-Encoding: deflate, gzip, x-gzip, identity, *;q=0\r\nReferer: http://xml.apache.org/\r\nConnection: Keep-Alive, TE\r\nTE: deflate, gzip, chunked, identity"

-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: Piplined requests in HTTP/1.1

Posted by "Roy T. Fielding" <fi...@ebuilt.com>.
On Wed, Mar 21, 2001 at 04:29:52PM -0500, Bill Stoddard wrote:
> Are pipelined requests really used?

Only in W3C libwww and benchmarks, though I wouldn't be surprised if
the latest version of MSIE's request dll uses them -- Henrik has been
at Microsoft long enough, though I don't know if he has been doing
anything in the MSIE universe.

> The requirement that responses be sent
> back in the order the request was received -really- sucks wind.

Ummm, that would be the ordering constraint of HTTP not having
request identifiers -- unrelated to pipelining, which is that the next
request can be sent before the response to a prior request is received.

....Roy


Re: Piplined requests in HTTP/1.1

Posted by Marc Slemko <ma...@znep.com>.
On Wed, 21 Mar 2001, Bill Stoddard wrote:

> Are pipelined requests really used?   The requirement that responses be sent
> back in the order the request was received -really- sucks wind.

pipelined requests aren't used by the majority of client (ie. IE), at
least last I checked.

But I'm not sure I understand your complaint about the ordering of
responses... it sucks from what perspective?

Sure, you could make your server more complex if it could build in a
scheduler that could re-order responses.  Then you go one step further and
say "hey, we need to add multiplexing support over a single TCP
connection".  Then you fall into the black hole that swallowed HTTP-NG
(oh, add some random object model voodoo there too) and are never heard
from again.

It is a fairly simple addition (from the server's perspective) that can,
in some situations and if the client so chooses, give a big benefit.


Re: Piplined requests in HTTP/1.1

Posted by "William M. Perry" <wm...@aventail.com>.
> "Bill Stoddard" <bi...@wstoddard.com> writes:
>
> > >
> > > Yes, pipelined requests are really used.  They are a huge performance
win,
> > > because fewer packets are used for the same request.
> > >
> > Where have you seen them used?  Jeff says IE 5.? may use them.
>
> Actually, I would guess it was Opera from the client string...  They
> also included mozilla and IE 5 in the string:
>
> User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 5.01
[en]
>
> This jives with what Roy said about Opera using a client library known
> to use pipelining.

Recent builds of mozilla also have an option to turn on pipelining of
requests.  Off by default for now, but they will eventually turn it on, when
they feel it is a little more stable / useful with the servers out there
now.

-bp


Re: Piplined requests in HTTP/1.1

Posted by Jeff Trawick <tr...@bellsouth.net>.
"Bill Stoddard" <bi...@wstoddard.com> writes:

> >
> > Yes, pipelined requests are really used.  They are a huge performance win,
> > because fewer packets are used for the same request.
> >
> Where have you seen them used?  Jeff says IE 5.? may use them.

Actually, I would guess it was Opera from the client string...  They
also included mozilla and IE 5 in the string:

User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 5.01  [en]

This jives with what Roy said about Opera using a client library known
to use pipelining.

-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: Piplined requests in HTTP/1.1

Posted by dean gaudet <dg...@arctic.org>.
On Wed, 21 Mar 2001, Bill Stoddard wrote:

> And my rub is this... Apache has a lot of code path dedicated to checking for pipelined requests.
> Apache 1.3 ap_bhalfduplex does an extra select on almost every single request, regardless of whether
> the connection is HTTP/1.0, HTTP/1.1, keep-alive or not (2.0 does similar things) all because the
> client -might- pipeline a request.  That extra select is expensive. Thus my question if pipelined
> requests are really being used.

in 2.0 the "extra" select isn't extra any more (because you're about to
block in poll for a timeout or read event anyhow).  i don't really see the
problem... it's not really a case where you can count the system call and
say "it's obvious this performs worse".

the alternative, when supporting pipelining, is to make non-optimal
packets.  which sucks worse than the system call does.  (or at least it
sucks worse on anything sane such as linux, you know how much tolerance i
have for kernels that have expensive system calls :).

the w3c paper which caused me to fix 1.3's pipeline support is a good
read:  http://www.w3.org/Protocols/HTTP/Performance/Pipeline.html

also, this is one of those cases where my personal opinion is that i'd
rather have an apache which works best for pipelined responses, regardless
of what crap clients are out there.  it's a chicken and egg problem.  if
apache's performance sucked in this respect then clients would never
change.  at least we're on the right side of this equation.

(note i haven't tested this stuff in 2.0 lately, not sure if it's actually
as clean as 1.3 is yet... it should have been one of your harder problems
to get right when doing the 2.0 i/o layer.)

-dean


Re: Piplined requests in HTTP/1.1

Posted by Bill Stoddard <bi...@wstoddard.com>.
>
> Yes, pipelined requests are really used.  They are a huge performance win,
> because fewer packets are used for the same request.
>
Where have you seen them used?  Jeff says IE 5.? may use them.

Yea, I know what they are for and how they work. The biggest win in pipelined requests is the
reduced latency (i.e., you don;t have to wait a round trip for each and every request/response
pair). I suspect pipelined requests don't significantly reduce the number of packets sent except in
somewhat contrived or special cases where responses to requests are significantly smaller than an
ethernet packet payload.

And my rub is this... Apache has a lot of code path dedicated to checking for pipelined requests.
Apache 1.3 ap_bhalfduplex does an extra select on almost every single request, regardless of whether
the connection is HTTP/1.0, HTTP/1.1, keep-alive or not (2.0 does similar things) all because the
client -might- pipeline a request.  That extra select is expensive. Thus my question if pipelined
requests are really being used.

Bill


Re: Piplined requests in HTTP/1.1

Posted by rb...@covalent.net.
Yes, pipelined requests are really used.  They are a huge performance win,
because fewer packets are used for the same request.

Ryan

On Wed, 21 Mar 2001, Bill Stoddard wrote:

> Are pipelined requests really used?   The requirement that responses be sent
> back in the order the request was received -really- sucks wind.
>
> Bill (who is no fan of pipelined requests)
>
>


_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------