Re: [quicwg/base-drafts] Reliable identification of the initial packet for a connection (#185)

Igor Lubashev <notifications@github.com> Sat, 11 February 2017 01:59 UTC

Return-Path: <noreply@github.com>
X-Original-To: quic-issues@ietfa.amsl.com
Delivered-To: quic-issues@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8D4A21295C7 for <quic-issues@ietfa.amsl.com>; Fri, 10 Feb 2017 17:59:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.999
X-Spam-Level:
X-Spam-Status: No, score=-6.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=github.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8qQtbDM2GS27 for <quic-issues@ietfa.amsl.com>; Fri, 10 Feb 2017 17:59:57 -0800 (PST)
Received: from github-smtp2a-ext-cp1-prd.iad.github.net (github-smtp2-ext8.iad.github.net [192.30.252.199]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CFD0C129422 for <quic-issues@ietf.org>; Fri, 10 Feb 2017 17:59:56 -0800 (PST)
Date: Fri, 10 Feb 2017 17:59:55 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1486778395; bh=bg0S2kEGpbgYQwbgkAWh/ZV7M3jCpWRmx25aMJ0uoHo=; h=From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=Ut4xnBkcNCGu5yzkpGJKcYB7Kg5mqKvppD0JbGI/pBAXpalyMP/Oh7q8591F+8I2v nPyGHqRIfaiBeDR29dYm5p4Xmlt+5U3IR8FyeieXEnujNmLVMCOYFymzhfG8VV+jGR ZvDcToldaoQZ4aW14nGZYlXxJoRCvZ5SDV1KgIjQ=
From: Igor Lubashev <notifications@github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Message-ID: <quicwg/base-drafts/issues/185/279112257@github.com>
In-Reply-To: <quicwg/base-drafts/issues/185@github.com>
References: <quicwg/base-drafts/issues/185@github.com>
Subject: Re: [quicwg/base-drafts] Reliable identification of the initial packet for a connection (#185)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_589e701bcf81f_43913f9f1ce0f13c272f0"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: igorlord
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/MAZ3VXYquiq-HPCWw53AlmSjhHI>
Cc: Subscribed <subscribed@noreply.github.com>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.17
Reply-To: quic@ietf.org
List-Id: Notification list for GitHub issues related to the QUIC WG <quic-issues.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic-issues/>
List-Post: <mailto:quic-issues@ietf.org>
List-Help: <mailto:quic-issues-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 11 Feb 2017 01:59:59 -0000

No, you _can_ know which server to direct traffic for existing connections to without maintaining state. All you need is something in each packet you are routing that identifies that server.  Hence a server-generated ConnectionID for QUIC.
For tcp, there is the sequence number that the server generated during SYC/ACK and which is carried in all TCP packets (and ICMP Error packets), except for TCP RST.  The "mostly stateless" for TCP is due to the nature of the always-mutating sequence number -- if the connection persists long enough, you may need to start keeping state.

The map you are suggesting would need to be a distributed map (it is not just one box that is doing all the load balancing).  While such a distributed map is possible within one pop, it would be a complex system that must keep nodes synced to a firehouse of changes and be resilient to packet #2 arriving on a different node, while the information about the routing decision has not yet propagated from the original node.
What's worse, for QUIC, this map would not work for Anycast-based CDNs, since when you are migrating from your WiFi network to a Mobile network, you are likely going to be taken to a geographically different Anycast pop. Reliably syncing a firehouse of connection establishment/teardown events across pops makes doing the same within a single pop seem easy.
- Igor 
P.S. Consistent Hash can help here but just a little. You can use consistent hash to pick a load balancer machine within a pop. That allows you to limit sharing of state with fewer than all load balancing nodes. But that cannot be used to route to the backend servers, since you need to consistently route to the correct backend nodes despite of the frequent changes in the set of backend nodes available to serve this particular traffic.

    On Friday, February 10, 2017 7:28 PM, janaiyengar <notifications@github.com> wrote:
 
How was this issue resolved?I don't understand the premise of the problem here. If you want to build something completely stateless, the only way to do it is ECMP with a consistent hash. You can do that on any packet in the connection and it won't matter.But if you're doing anything smarter, you're going to be stateful. You cannot know which server to direct traffic for existing connections to without maintaining state. The state that you need it a table mapping 4-tuple to server for TCP, and you could do the same with connection ID to server for QUIC.Since you will have this map (this may be the "mostly stateless" part you mention earlier), any received packet that has a connection ID that's missing from the map can create a new entry. You can be smarter about it, but this is a fairly simple and largely effective algorithm that ought to work.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.  

   

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/185#issuecomment-279112257