Re: [hybi] Multiplexing: Pre-AddChannelResponse quota

"Arman Djusupov" <arman@noemax.com> Thu, 14 June 2012 09:59 UTC

Return-Path: <arman@noemax.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 88E9F21F86A4 for <hybi@ietfa.amsl.com>; Thu, 14 Jun 2012 02:59:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5 tests=[AWL=-0.000, BAYES_00=-2.599, HTML_MESSAGE=0.001]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JxD-c6Dh8hKh for <hybi@ietfa.amsl.com>; Thu, 14 Jun 2012 02:59:17 -0700 (PDT)
Received: from mail.noemax.com (mail.noemax.com [64.34.201.8]) by ietfa.amsl.com (Postfix) with ESMTP id E3FBF21F86A1 for <hybi@ietf.org>; Thu, 14 Jun 2012 02:59:16 -0700 (PDT)
DKIM-Signature: a=rsa-sha1; t=1339667949; x=1340272749; s=m1024; d=noemax.com; c=relaxed/relaxed; v=1; bh=2swRttiIR1ewIbMgPAJpcydLzgo=; h=From:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type:In-Reply-To:References; b=ulWkJKkSUOy+agA7jLGPLIc3ySGePBYC+ZlDGHzN7nB+O9zx3Ons1hNCG4wn5rXAMh6FdvBoCbU/CJiOAafKKVLubp/BtOQ5swjsPNthtlLbIjYJ7o9Vg3Jh6213nyU7z81jcTp+3A05IfvAMCDer0uWN55+ym3yNUvd94IC18E=
Received: from mail.noemax.com by mail.noemax.com (IceWarp 10.4.1) with ASMTP (SSL) id YPV89807; Thu, 14 Jun 2012 12:59:07 +0300
From: Arman Djusupov <arman@noemax.com>
To: 'Takeshi Yoshino' <tyoshino@google.com>, 'Jamie Lokier' <jamie@shareable.org>
References: <CAH9hSJZUAHQzDm4ofq6onc620SNretLQDOcjSnr2eQ0YA9yFdQ@mail.gmail.com> <002f01cd3cc4$4791b380$d6b51a80$@noemax.com> <20120607034440.GD26406@jl-vm1.vm.bytemark.co.uk> <CAH9hSJZWMgvQMNLapZAg_CS0vri=jZbfPLpLhfninjzG+JxxmA@mail.gmail.com> <CAH9hSJbChf6NPUqraaeEeLnDO=YyYja4SkwZJsWRfM5VUwZ59Q@mail.gmail.com>
In-Reply-To: <CAH9hSJbChf6NPUqraaeEeLnDO=YyYja4SkwZJsWRfM5VUwZ59Q@mail.gmail.com>
Date: Thu, 14 Jun 2012 12:58:54 +0300
Message-ID: <002001cd4a14$53eb66f0$fbc234d0$@noemax.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0021_01CD4A2D.793AE8E0"
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQHbEEjWH8q2xL+U7IgUz4ieagM0MAIpCHL8APvLbp8B3rSIHAHfCnvqlqbynPA=
Content-Language: en-us
Cc: hybi@ietf.org
Subject: Re: [hybi] Multiplexing: Pre-AddChannelResponse quota
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: Thu, 14 Jun 2012 09:59:18 -0000

-- send quota for X is set to (PQ_i) - (total pre-handshake data sent) +
(initial send quota assigned by the AddChannelResponse)

 

The quota header in AddChannelResponse is not needed, the server can
supplement the client quota using normal flow control frames. This would
simplify it a bit. If the server needs to grant additional quota right after
the AddChannelResponse, it can send an FC block in the same frame with the
AddChannelResponse. The FC block format is more efficient than the literal
format of the AddChannelResponse header.

 

A more simple description would be that the client simply sets its quota to
the PQ-I value and continues using it until it gets an FC block from the
server that would increment it. The server keeps track of the number of
active slots on the client side so it knows the current PQ-I value and also
starts keeping track of the client quota based on the PQ-I value.

 

- When received, say, PreHandshakeQuota block, split it up and add to slots
so that PQ_k are leveled (older ones first) among all slots

 

Why to split up the quota? This leave room for strange cases when the quota
is not divisible by the number of channels. Why not simply set or add a
value to each already allocated slot? 

 

With best regards,

Arman

 

 

From: Takeshi Yoshino [mailto:tyoshino@google.com] 
Sent: Thursday, June 14, 2012 11:56 AM
To: Jamie Lokier
Cc: Arman Djusupov; hybi@ietf.org
Subject: Re: [hybi] Multiplexing: Pre-AddChannelResponse quota

 

On Wed, Jun 13, 2012 at 7:18 PM, Takeshi Yoshino <tyoshino@google.com>
wrote:

On Thu, Jun 7, 2012 at 12:44 PM, Jamie Lokier <jamie@shareable.org> wrote:

If there is a max_simultaneous_handshakes - why not recast that as

"initial new-channels window" - meaning a flow control grant, which is
updated by further grants from the server.  (Very similar to the flow
control per channel).

 

Good idea. I'll take it.

 

I'm designing algorithm to realize this. My current idea is as follows. Just
a first strawman. It's very complicated.

 

- New channel window is a set of slots for new channel creation attempts

-- Each slot corresponds to one future/in-flight AddChannelRequest

-- Each slot (Slot_k) has pre-handshake quota (PQ_k)

-- When received, say, NewChannelQuota block, add a new slot. The new slot
has pre-handshake quota of 0

- When received, say, PreHandshakeQuota block, split it up and add to slots
so that PQ_k are leveled (older ones first) among all slots

- To issue an AddChannelRequest with channel ID X, the client picks oldest
unused slot (Slot_i) for it

- The client MAY send pre-handshake data for the channel X up to PQ_i

- When received the corresponding AddChannelResponse,

-- send quota for X is set to (PQ_i) - (total pre-handshake data sent) +
(initial send quota assigned by the AddChannelResponse)

-- Slot_i is removed from the new channel window

 

Goals are:

 

- make it able to increase the pre-handshake send quota for already
allocated slots

- give pre-handshake quota equally to all active slots

- carry over remaining pre-handshake quota into post-handshake quota

- deterministic, not affected by timing