[web-devel] HTTP pipelining and constant space usage?

Jeremy Shaw jeremy at n-heptane.com
Wed Sep 18 19:49:54 CEST 2013


Don't worry, I'm planning for SPDY and WebSockets as well :)


On Wed, Sep 18, 2013 at 12:40 PM, Bardur Arantsson <spam at scientician.net>wrote:

> On 2013-09-18 17:45, Jeremy Shaw wrote:
>
> > The problem is that the client is allowed to send an unlimited number of
> > Requests before it bothers to read any Responses.
> >
> > If your server uses the model of read a single Request and send the
> > Response entirely before moving onto the next Request, then you could
> > potentially deadlock because the client is still in the sending phase and
> > you are blocked on a write().
> >
> > So, we are basically forced to read all the Requests before sending a
> > Response? But, then the client could perform a DoS by sending millions of
> > requests..
> >
> > Any thoughts on how best to handle this?
>
> Implement SPDY instead or wait for HTTP 2.0 :).
>
> This is of course somewhat tongue-in-cheek, but really HTTP pipelining
> is notoriously complicated to get right and not sufficient for actually
> achieving what one wants. Multiplexing as in SPDY is much saner and
> based on actual use cases, admittedly from the "browser" portion of the
> HTTP client ecosystem, but actual use cases nonetheless.
>
> (Not saying that SDPY is all roses, btw, but that's irrelevant to this
> discussion.)
>
> If it were me, I'd simply not support HTTP pipelining.
>
>
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20130918/bcc75781/attachment.htm>


More information about the web-devel mailing list