Re: [hybi] Simplify WebSocket multiplexing

"Arman Djusupov" <> Thu, 30 May 2013 14:38 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id A2D6421F87D2 for <>; Thu, 30 May 2013 07:38:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Jft1yescz-2W for <>; Thu, 30 May 2013 07:38:10 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 77B3F21F8E6E for <>; Thu, 30 May 2013 07:38:09 -0700 (PDT)
DKIM-Signature: a=rsa-sha1; t=1369924684; x=1370529484; s=m2048;; c=relaxed/relaxed; v=1; bh=EK9S2URlM2rDbMVgglzwFdqVN6Y=; h=From:Subject:Date:Message-ID:To:MIME-Version:Content-Type:In-Reply-To:References; b=ngo+K/c5vmQKV5btoj6nIZYlzKVubOWAuo/19U/IN/OmheCc6qfV6T3kyRb2GUMqopscYE2y1xBAztb7e1L1YhSrVUyWmU328qlb7EIPs6ewV2RSe+MqGDHu0J8eD1gd9DPChkKIf56eTf65l/9MnknEEGqupneAv+iT8ZaIYemcCoiGJVfGvOo0NuClivJf1XONlNThXXVtcn2enNeX3bf1rtg132LOhQasMioBXQn2aTUknm8D0Aj3o/mVyOvSJUUWJ01JLRSleaOKLyCpMK4iiig9iWNOHpk7KcasvHvQLDdtgF5dTnQyUHCn4UeGoYBfl5Z2wytdHoQOAayPyQ==
Received: from by (Noemax Mail Server) with ASMTP (SSL) id 201305301738030291; Thu, 30 May 2013 17:38:03 +0300
From: "Arman Djusupov" <>
To: "'Takeshi Yoshino'" <>, <>
References: <>
In-Reply-To: <>
Date: Thu, 30 May 2013 17:38:02 +0300
Message-ID: <005001ce5d43$4bcb74e0$e3625ea0$>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0051_01CE5D5C.7118ACE0"
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQJIpJn/mIepNG7p5bRkeMd7fgmhTpgpPOwQ
Content-Language: en-us
Subject: Re: [hybi] Simplify WebSocket multiplexing
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: Thu, 30 May 2013 14:41:46 -0000

Agree on dropping 1,2, 4.


Flow control (6) cannot be removed, mux would not work without it.


I would also simplify the initial handshake by removing the quota from the
handshake. Let the server be required to send the first set of channel slots
right after replying to the HTTP handshake, this will not cause any delays
and there will 

be a unified initial quota mechanism for all channels including first
logical channel. So the client sends a handshake requesting the mux
extension, as reply it gets an HTTP response confirming the handshake and
the set of new channel slots in the first frame.


Another part of spec to simplify is the DropChannel close codes. There are
too many codes that cover protocol violations. Since we are not designing a
unit-test framework for bad implementations I think most of those are not
needed. Any protocol violation should result in dropping the physical
connection, there is simply no reason to continue communicating with a pier
that does not adhere to the protocol and obviously is not compatible. Polite
behavior in such cases can only be abused by a DoS attacker, where a
malicious client keeps violating the protocol to force the remote endpoint
to send "error reports", wasting its time and I/O threads.


With best regards,




From: [] On Behalf Of
Takeshi Yoshino
Sent: Thursday, May 30, 2013 10:17 AM
Subject: [hybi] Simplify WebSocket multiplexing


(Branching from the thread "Call for interest: multiplexing dedicated for


It seemed that we had rough consensus on accelerating WebSocket dedicated
multiplexing by simplifying it if we keep working on it.


I'd like to hear your opinion on this in this separate thread. Below listed
some points we could drop/simplify including both ones suggested in the
thread and some I came up with now.


1) Header delta encoding in AddChannelRequest

2) Header delta encoding in AddChannelResponse

3) Channel slot

4) Only one mux control in one message

5) Use the length encoding for encoding mux channel ID

6) Drop flow control




My opinion is to do 1, 2 and 4.