Re: [tcpm] Faster application handshakes with SYN/ACK payloads

Stefanos Harhalakis <v13@v13.gr> Sun, 21 September 2008 18:39 UTC

Return-Path: <tcpm-bounces@ietf.org>
X-Original-To: tcpm-archive@megatron.ietf.org
Delivered-To: ietfarch-tcpm-archive@core3.amsl.com
Received: from [127.0.0.1] (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 6F0EC3A6AFD; Sun, 21 Sep 2008 11:39:43 -0700 (PDT)
X-Original-To: tcpm@core3.amsl.com
Delivered-To: tcpm@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 75EA53A6A8C for <tcpm@core3.amsl.com>; Sun, 21 Sep 2008 11:39:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.343
X-Spam-Level:
X-Spam-Status: No, score=-0.343 tagged_above=-999 required=5 tests=[AWL=-2.931, BAYES_00=-2.599, FRT_STOCK2=3.988, J_CHICKENPOX_101=0.6, J_CHICKENPOX_34=0.6]
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 QUoQRINZ+-kr for <tcpm@core3.amsl.com>; Sun, 21 Sep 2008 11:39:41 -0700 (PDT)
Received: from mx-out.forthnet.gr (mx-out.forthnet.gr [193.92.150.104]) by core3.amsl.com (Postfix) with ESMTP id 0260D3A6947 for <tcpm@ietf.org>; Sun, 21 Sep 2008 11:39:40 -0700 (PDT)
Received: from mx-av-05.forthnet.gr (mx-av.forthnet.gr [193.92.150.27]) by mx-out-03.forthnet.gr (8.14.3/8.14.3) with ESMTP id m8LIeR8O025520; Sun, 21 Sep 2008 21:40:27 +0300
Received: from MX-IN-05.forthnet.gr (mx-in-05.forthnet.gr [193.92.150.32]) by mx-av-05.forthnet.gr (8.14.3/8.14.3) with ESMTP id m8LIdu2V027684; Sun, 21 Sep 2008 21:39:56 +0300
Received: from hell.hell.gr (adsl70-48.lsf.forthnet.gr [79.103.197.48]) by MX-IN-05.forthnet.gr (8.14.3/8.14.3) with ESMTP id m8LIdrxD012457; Sun, 21 Sep 2008 21:39:54 +0300
Authentication-Results: MX-IN-05.forthnet.gr smtp.mail=v13@v13.gr; spf=neutral
Authentication-Results: MX-IN-05.forthnet.gr header.from=v13@v13.gr; sender-id=neutral
From: Stefanos Harhalakis <v13@v13.gr>
To: Joe Touch <touch@isi.edu>
Date: Sun, 21 Sep 2008 21:39:53 +0300
User-Agent: KMail/1.9.9
References: <396556a20807311252j67b1ab26mf6511dbdae780fdd@mail.gmail.com> <200809211244.30186.v13@v13.gr> <48D676AF.5030509@isi.edu>
In-Reply-To: <48D676AF.5030509@isi.edu>
MIME-Version: 1.0
Content-Disposition: inline
Message-Id: <200809212139.53591.v13@v13.gr>
Cc: Adam Langley <agl@imperialviolet.org>, tcpm@ietf.org
Subject: Re: [tcpm] Faster application handshakes with SYN/ACK payloads
X-BeenThere: tcpm@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TCP Maintenance and Minor Extensions Working Group <tcpm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/tcpm>, <mailto:tcpm-request@ietf.org?subject=unsubscribe>
List-Archive: <https://www.ietf.org/mailman/private/tcpm>
List-Post: <mailto:tcpm@ietf.org>
List-Help: <mailto:tcpm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tcpm>, <mailto:tcpm-request@ietf.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tcpm-bounces@ietf.org
Errors-To: tcpm-bounces@ietf.org

Hello,

I'm sending this reply mostly to clarify the things. Perhaps there is 
something that I don't understand or I don't express well. If it is so, 
please excuse the stubbornness of mine.

On Sunday 21 September 2008, Joe Touch wrote:
> HTTP does send a banner of that type; the issue is that you want #2
> above - if you don't act on the banner info until after the TWHS, you
> "waste" an RTT waiting for the connection to be established before the
> server can reply.
>
> That's a **design feature** and requirement of TCP, not a "waste".

I don't exactly understand what you mean by saying that HTTP sends a banner. 
An HTTP server will never send anything unless it is triggered to do so by a 
client request. Creating an HTTP version that sends an initial one-line (or 
more) will break backwards compatibility. (no?)

> > and more specifically with the first sentence. Supposing that (a
> > hypothetical) HTTP/1.3 would support an optional banner, such an option
> > would allow the server side to send it without braking backwards
> > compatibility:
> >
> > Client --> SYN+DATA --> Server
> > Client <-- SYNACK+? <-- Server
> > Client -->   ACK    --> Server
> > Client <--  BANNER  <-- Server
>
> The server can start sending data before the TWHS completes (let's call
> the above "sequence 1" and the below "sequence 2"):
>
> Client --> SYN+DATA --> Server
> Client <-- SYNACK+? <-- Server
> Client <--  BANNER  <-- Server
> Client -->   ACK    --> Server
>
> In sequence 1, the banner can depend on the SYN+DATA data. In BOTH
> sequences, however, the SYNACK+? "?" **cannot** depend on the SYN+DATA
> data.

I believe that I didn't describe well what I meant (or else I don't completely 
understand what you're saying).

I'm talking about (lets say) 8 bits of out-of-band information that the client 
can send to the server side and vice-versa. The server side application will 
most probably get those data after the TWHS completes. There is no placed 
requirement to do otherwise.

So, a complete trace (with most function arguments ommited or altered for 
simplicity, no error handling, etc etc :-) of a non-well thought proposal 
(there are issues) would be:

(C: Client, S: Server)

# Server side listens for connections, supports USER_DATA
S: s0=socket()
S: setsockopt(s0, SO_USER_DATA, 0x02)
S: bind(s0, 0.0.0.0, 80)
S: listen(s0)

# Client attempts connection. Sends USER_DATA
C: s=socket()
C: setsockopt(s, SO_USER_DATA, 0x01)
C: connect(1.2.3.4, 80)

# Connection is established. Remote USER_DATA is available to both ends
S: s=accept()
S: getsockopt(s, SO_REMOTE_USER_DATA, &mybuf)
C: getsockopt(s, SO_REMOTE_USER_DATA, &mybuf)

At this point, the client side has connected to the server side and they have 
exchanged one byte of out-of-band data (C->S: 0x01, S-C: 0x02). This is all 
done without messing with the TWHS.

>From the TCP's point of view, the above would look like:

* Client sends SYN with TCP option USER_DATA, length 1, data 0x01
* Server receives SYN, supports USER_DATA, responds with SYNACK with option 
USER_DATA length 1, data 0x02 and *no* data in the segment.
* Client receives SYNACK and responds with ACK
* Everything continues normally

The only difference with existing TCP behavior is that a 3-bytes TCP option is 
included in the SYN and SYNACK segments. There is no messing with user data 
in SYNACK at all. Perhaps the USER_DATA option name is confussing. USER_DATA 
is just an arbitrary name for a KIND of an option.

> > p.s: I can write a draft if this would clarify things.
>
> I think you're exploring the space of the discussion that has already
> been had on this list...

Adam's proposal was that data (outside of TCP options) would be sent with the 
SYNACK field. I still believe that the USER_DATA option is not related to 
that. Perhaps if I hadn't initially related this proposal with Adam's 
proposal (since it is related to his 'wish' and not to his proposal) it would 
be clearer?

I'm *really* sorry if what you say above is true and I just don't understand 
something. 

p.s. Do you know if there is a way to force the tcpm mailing list to send me 
duplicates for mails that are CC'd to me too? It seems that all mails that 
I'm CC'd are only sent directly and not via the list. I've set the "Avoid 
duplicate copies of messages?" to "No" in the mailman options but there was 
no change.
_______________________________________________
tcpm mailing list
tcpm@ietf.org
https://www.ietf.org/mailman/listinfo/tcpm