From owner-freebsd-chat Wed Jun 13 8:40: 9 2001 Delivered-To: freebsd-chat@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id CB88537B401 for ; Wed, 13 Jun 2001 08:39:51 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id LAA02461; Wed, 13 Jun 2001 11:39:50 -0400 (EDT) (envelope-from wollman) Date: Wed, 13 Jun 2001 11:39:50 -0400 (EDT) From: Garrett Wollman Message-Id: <200106131539.LAA02461@khavrinen.lcs.mit.edu> To: "Peter Brezny" Cc: Subject: FW: FTP almost gone now? (was: Re: IPFW almost works now.) In-Reply-To: References: Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I've redirected this discussion to -chat which is a more appropriate list now, since this really isn't FreeBSD-security material. < said: > I was under the impression that the http protocol is a much 'chattier' > protocol than ftp, and that regardless of them running on identical tcp > connections, FTP is much more efficient by nature of the Protocol. Not at all. Here is a minimal HTTP request (assuming you're GETting files; PUTting them is more involved): ------------------------------------ GET /foo/bar/baz HTTP/1.1 Host: the.name.of.the.remote.host Connection: close ------------------------------------ The second generation of fetch(1) (as opposed to the current, third-generation fetch, which I didn't write, or the original) actually added a good deal more information, some of which was dependent on command-line options, and still managed to fit the entire request into a single packet (which could be transmitted in the TCP SYN segment) for a theoretically-minimal three-round-trip connection. By contrast, the same transaction in the FTP protocol typically involves: [SYN] [SYN-ACK] [ACK] 200 USER foo 331 PASS bar 230 TYPE I 200 SIZE foo/bar/baz 213 MDTM foo/bar/baz 213 PORT 1,2,3,4,5,6 200 RETR foo/bar/baz 150 [at least three round trips for data connection] 226 QUIT 221 [+ FIN] [FIN-ACK] That's thirteen round-trips for what HTTP can do in three -- which is why timbl created HTTP in the first place (the penalty of taking a dozen round trips on a few KB of text was simply unreasonable). Because FTP uses two connections rather than one, it also has higher kernel resource requirements than HTTP in the common case of one-file-per-connection. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message