Re: [hybi] Upgrade Mechanism and HasMat (was Re: Extensibility mechanisms?)

Dave Cridland <dave@cridland.net> Thu, 22 July 2010 12:27 UTC

Return-Path: <dave@cridland.net>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id C9A833A688E for <hybi@core3.amsl.com>; Thu, 22 Jul 2010 05:27:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.227
X-Spam-Level:
X-Spam-Status: No, score=-2.227 tagged_above=-999 required=5 tests=[AWL=0.372, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CRH6eAC56OTU for <hybi@core3.amsl.com>; Thu, 22 Jul 2010 05:27:11 -0700 (PDT)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [217.155.137.61]) by core3.amsl.com (Postfix) with ESMTP id 20B2D3A67ED for <hybi@ietf.org>; Thu, 22 Jul 2010 05:27:11 -0700 (PDT)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 000E7116805C; Thu, 22 Jul 2010 13:27:26 +0100 (BST)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (localhost.localdomain [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2CxRcCYWU8Rc; Thu, 22 Jul 2010 13:27:25 +0100 (BST)
Received: from puncture (puncture [217.155.137.60]) by peirce.dave.cridland.net (Postfix) with ESMTPA id 0F5611168041; Thu, 22 Jul 2010 13:27:25 +0100 (BST)
References: <AANLkTims1er0Rbv0ysP4gRs1Kd0He8hapHeJ3nON=JQa@mail.gmail.com> <4C47C5B0.3030006@caucho.com> <AANLkTi=ND-FOH8OoD=TCbiyeSZ-h0LhxQBXN5w-2hfvj@mail.gmail.com> <20100722055452.GL7174@1wt.eu> <AANLkTik_rpxo=1OfzHkwpC5soQG_NxvGuZNXx7gdhVTh@mail.gmail.com> <20100722064945.GM7174@1wt.eu> <AANLkTim7AsQGSwLE51uktj=B1vB6roZChAtDoCrE6fFG@mail.gmail.com> <4C47FF71.3050000@ericsson.com> <18E0FF9C-6C51-4602-92E1-E44802D0D8B5@gbiv.com> <4C481C76.1060907@ericsson.com> <20100722121317.GA12582@1wt.eu>
In-Reply-To: <20100722121317.GA12582@1wt.eu>
MIME-Version: 1.0
Message-Id: <27220.1279801645.011385@puncture>
Date: Thu, 22 Jul 2010 13:27:25 +0100
From: Dave Cridland <dave@cridland.net>
To: Willy Tarreau <w@1wt.eu>, "Roy T. Fielding" <fielding@gbiv.com>, Server-Initiated HTTP <hybi@ietf.org>, Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] Upgrade Mechanism and HasMat (was Re: Extensibility mechanisms?)
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/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, 22 Jul 2010 12:27:12 -0000

On Thu Jul 22 13:13:17 2010, Willy Tarreau wrote:
> The only fear I have right now with the nonce as defined by the WS  
> draft
> is that it makes use of MD5 which comes with a cost. I know at  
> least one
> site dealing with more than 300k concurrent connections at a rate  
> between
> 12 and 18k per second (long polling right now), and I think that  
> computing
> MD5 hashes can significantly impact performance at these rates. If  
> the
> goal is to ensure the response header depends on the request  
> header, we
> may reliably make use of cheaper algorithms.

I'd assume that an actual server can do faster than my cheap  
workstation:

$ openssl speed md5
Doing md5 for 3s on 16 size blocks: 7765276 md5's in 3.00s
Doing md5 for 3s on 64 size blocks: 6086328 md5's in 3.00s
Doing md5 for 3s on 256 size blocks: 3674140 md5's in 3.00s
Doing md5 for 3s on 1024 size blocks: 1420165 md5's in 3.00s
Doing md5 for 3s on 8192 size blocks: 212112 md5's in 3.00s

FWIW, SHA-1 is only slightly slower. If you had 300k all join at  
once, then it still seems to be this would be a drop in the ocean in  
terms of loading.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade