Re: HTTP router point-of-view concerns

Willy Tarreau <w@1wt.eu> Fri, 12 July 2013 20:03 UTC

Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E71D721F9EE9 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 12 Jul 2013 13:03:51 -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=[BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
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 xZmwnNJbGTHB for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 12 Jul 2013 13:03:45 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id AE67221F9E39 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 12 Jul 2013 13:03:45 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UxjYZ-0001Mq-LO for ietf-http-wg-dist@listhub.w3.org; Fri, 12 Jul 2013 20:03:07 +0000
Resent-Date: Fri, 12 Jul 2013 20:03:07 +0000
Resent-Message-Id: <E1UxjYZ-0001Mq-LO@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <w@1wt.eu>) id 1UxjYR-0001MB-5s for ietf-http-wg@listhub.w3.org; Fri, 12 Jul 2013 20:02:59 +0000
Received: from 1wt.eu ([62.212.114.60]) by lisa.w3.org with esmtp (Exim 4.72) (envelope-from <w@1wt.eu>) id 1UxjYQ-0002wx-7A for ietf-http-wg@w3.org; Fri, 12 Jul 2013 20:02:59 +0000
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id r6CK0nB2032242; Fri, 12 Jul 2013 22:00:49 +0200
Date: Fri, 12 Jul 2013 22:00:49 +0200
From: Willy Tarreau <w@1wt.eu>
To: Amos Jeffries <squid3@treenet.co.nz>
Cc: ietf-http-wg@w3.org
Message-ID: <20130712200049.GD32054@1wt.eu>
References: <CAP+FsNdcYhA=V5Z+zbt70b5e7WmcmXgjG5M9L3vfXeXfTwmRnw@mail.gmail.com> <51DE327C.7010901@treenet.co.nz> <CABkgnnXeqD6wh0dcJ1Dz=4PLAJNkDeGcCuzMr9ATd_7xS7nbGQ@mail.gmail.com> <CABP7RbcUkLf3CTAB4jwicnsiKWLGVY6=hX0k=0256SR_gcVt9A@mail.gmail.com> <092D65A8-8CB7-419D-B6A4-77CAE40A0026@gmail.com> <3835.1373612286@critter.freebsd.dk> <CD9E163F-1225-4DA8-9982-8BDBD16B1051@mnot.net> <1772.1373629495@critter.freebsd.dk> <20130712125628.GC28893@1wt.eu> <51E03D17.5010801@treenet.co.nz>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <51E03D17.5010801@treenet.co.nz>
User-Agent: Mutt/1.4.2.3i
Received-SPF: pass client-ip=62.212.114.60; envelope-from=w@1wt.eu; helo=1wt.eu
X-W3C-Hub-Spam-Status: No, score=-3.2
X-W3C-Hub-Spam-Report: AWL=-2.889, RP_MATCHES_RCVD=-0.303, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1UxjYQ-0002wx-7A 7c7523857f1ec7d7d0cfeb02e0487a1c
X-Original-To: ietf-http-wg@w3.org
Subject: Re: HTTP router point-of-view concerns
Archived-At: <http://www.w3.org/mid/20130712200049.GD32054@1wt.eu>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/18736
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On Sat, Jul 13, 2013 at 05:29:59AM +1200, Amos Jeffries wrote:
> In these cases you build your session identifier to contain a shard 
> reference as well as an UID.
> For example I'm pretty sure that Facebook does not replicate all users 
> entire account details onto each and every server, or in a Cookie being 
> sent back and forward. For good reason. No, they have an ID which allows 
> extremely fast backend referencing for whatever assembly server is 
> running to access whatever data server the users account it stored on. 
> Not exactly complex even when running at large scale.
> 
> 
> >So there *is* some use to store data on the client, it's just that it
> >has been long abused to store session identifiers because it was the
> >only mechanism available.
> 
> Only the Session ID and/or a shard reference (combined in one opaque 
> blob is even better) need be stored on the client.

A shard reference or session ID are two completely different things. A
session ID comes from one referential. A shard reference indicates what
referential to use. That's why a user-provided session ID cannot be used
as a shard reference and prevents from scaling. I *do* use cookies exactly
as you describe because it's the only way to scale, and have been doing so
for almost a decade now. In a cookie, you can indicate the DC, the server,
a location in a database, etc... Whatever you need to perform very fast
access. You simply can't do that by learning massive amounts of randoms
generated by clients.

Regards,
Willy