Re: [hybi] max frame size. was: consensus call on ability to announce max frame size

Piotr Kulaga <piotrku@microsoft.com> Wed, 03 August 2011 16:55 UTC

Return-Path: <piotrku@microsoft.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7BFB821F8B6F for <hybi@ietfa.amsl.com>; Wed, 3 Aug 2011 09:55:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.599
X-Spam-Level:
X-Spam-Status: No, score=-10.599 tagged_above=-999 required=5 tests=[AWL=0.000, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SClbDxnvzklS for <hybi@ietfa.amsl.com>; Wed, 3 Aug 2011 09:55:47 -0700 (PDT)
Received: from smtp.microsoft.com (mailc.microsoft.com [131.107.115.214]) by ietfa.amsl.com (Postfix) with ESMTP id D3FC221F8B6E for <hybi@ietf.org>; Wed, 3 Aug 2011 09:55:47 -0700 (PDT)
Received: from TK5EX14MLTC104.redmond.corp.microsoft.com (157.54.79.159) by TK5-EXGWY-E803.partners.extranet.microsoft.com (10.251.56.169) with Microsoft SMTP Server (TLS) id 8.2.176.0; Wed, 3 Aug 2011 09:55:59 -0700
Received: from TK5EX14MBXC206.redmond.corp.microsoft.com ([169.254.4.211]) by TK5EX14MLTC104.redmond.corp.microsoft.com ([157.54.79.159]) with mapi id 14.01.0323.007; Wed, 3 Aug 2011 09:55:59 -0700
From: Piotr Kulaga <piotrku@microsoft.com>
To: Greg Wilkins <gregw@intalio.com>, Hybi <hybi@ietf.org>
Thread-Topic: [hybi] max frame size. was: consensus call on ability to announce max frame size
Thread-Index: AQHMTxpTBSaDY9QPpkOCQOVe24dHRpULXE2w
Date: Wed, 03 Aug 2011 16:55:58 +0000
Message-ID: <ED13A76FCE9E96498B049688227AEA293897FCE2@TK5EX14MBXC206.redmond.corp.microsoft.com>
References: <CAH_y2NFccb=qZOYf+8U31xt0afJqe2GURqsEow7Wasv664DX4A@mail.gmail.com>
In-Reply-To: <CAH_y2NFccb=qZOYf+8U31xt0afJqe2GURqsEow7Wasv664DX4A@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [157.54.51.71]
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [hybi] max frame size. was: consensus call on ability to announce max frame size
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 03 Aug 2011 16:55:48 -0000

Can you please explain why we may need a size limit on a frame? It does not really makes sense to me - if a frame is too big for you for some reasons, act as intermediary and split single frame into multiple ones (assuming you understand extensions, which should be very common). 

I see some benefits in having a limit on a message size i.e. you can easily provide a message based APIs. However, as you mentioned stream APIs are a norm in HTTP world and personally I do not see a reason for any limits on message/frame size.

Kind regards,
Piotr

-----Original Message-----
From: hybi-bounces@ietf.org [mailto:hybi-bounces@ietf.org] On Behalf Of Greg Wilkins
Sent: Saturday, July 30, 2011 5:40 PM
To: Hybi
Subject: [hybi] max frame size. was: consensus call on ability to announce max frame size

Changing topic to avoid debate in consensus call thread.




On 30 July 2011 17:46, John Tamplin <jat@google.com> wrote:
> I see no mention of maximum message size in this consensus call, only 
> maximum frame size.

Sorry if that muddied the water. But I just wanted to be crystal clear we are talking about frames not messages.


On 30 July 2011 17:31, Willy Tarreau <w@1wt.eu> wrote:
> I'd also argue that HTTP has been living for a decade with support for 
> chunked encoding which does not set a limit on chunk size nor on 
> message size and has not had any trouble with that.

But HTTP also does not have a chunk-too-large error code.
Implementations are forced to deal with large chunks.  This is often
no too difficult because stream APIs are the norm for HTTP.   Large
sizes are harder to handle in the datagram API of websocket.


On 30 July 2011 23:34, Thomson, Martin <Martin.Thomson@commscope.com> wrote:
> Given that there is no constraint on message size, this capability is pointless.  Any peer that receives this indication does not need to change their behaviour in any meaningful way.  Messages of any size can be sent regardless of what frame size is supported.

Note sure if you are talking about max message or max frame size?

But a peer that does not respect a max frame indication and does not change it's behaviour will then just receive frame-too-large errors in
response.   If we allow frame-too-large errors, then surely we need a
way to communicate what is not too large.

Also, while I think a max frame size should be optional to declare, I think that once it is declared it should be mandatory for senders to respect that limit.



> That said, such a negotiation might be crucial to an effective multiplexing scheme.  I suggest that this be deferred and included as part of the multiplexing work.

I think it is more than just MUX that needs this.  Because of the datagram style API of websockets, applications will not be stream based (blocked reading content), but will be called back when frames and/or messages are received.  Thus there will be implementations that have fixed buffer sizes and will not work with large frames and/or
messages.      For large messages, there is not much the
implementations can do to influence the applications, so I don't see a limit being worthwhile.  But for a max frame size, it is pretty simple for implementations to fragment messages to respect a limit.


regards
_______________________________________________
hybi mailing list
hybi@ietf.org
https://www.ietf.org/mailman/listinfo/hybi