Re: [hybi] Max frame size

Willy Tarreau <> Wed, 22 June 2011 12:25 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 8781111E8076 for <>; Wed, 22 Jun 2011 05:25:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -4.74
X-Spam-Status: No, score=-4.74 tagged_above=-999 required=5 tests=[AWL=-2.697, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id HH7iarGg1SDh for <>; Wed, 22 Jun 2011 05:25:46 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 61DC511E8073 for <>; Wed, 22 Jun 2011 05:25:46 -0700 (PDT)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p5MCPL4m022227; Wed, 22 Jun 2011 14:25:21 +0200
Date: Wed, 22 Jun 2011 14:25:21 +0200
From: Willy Tarreau <>
To: Francis Brosnan Blazquez <>
Message-ID: <>
References: <1308720860.5393.18.camel@tot.local> <> <1308738811.11941.704.camel@vulcan.aspl.local>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1308738811.11941.704.camel@vulcan.aspl.local>
User-Agent: Mutt/
Subject: Re: [hybi] Max frame size
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 22 Jun 2011 12:25:48 -0000

On Wed, Jun 22, 2011 at 12:33:31PM +0200, Francis Brosnan Blazquez wrote:
> Hi Willy,
> > There is nothing in the protocol which makes whole frame buffering mandatory
> I know, but I'm not talking about buffering, I'm talking about what to
> do when you receive more content than you can buffer. 
> With the current design, the server have the following options: close
> the connection, or keep buffering or pass octects directly to the app
> level without having a frame header (with previous frame closed)...all 3
> options are really bad idea.

But why would it strip the frame header ? It should simply pass the frame
header and stream the data.

The server should proceed exactly as it would proceed if receiving a large
POST. All file transfer applications which support large POSTs (webmails
etc...) don't buffer everything, they pass it as a stream. Do you imagine
if the server had to buffer a DVD image or something like this before passing
it to the application ?

I don't see the difference with frames. You can call the application saying
"hey, here come 5 GB of data, please read them from this connection handle".