Date: Wed, 13 Jun 2001 11:39:50 -0400 (EDT) From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> To: "Peter Brezny" <pab@sysadmin-inc.com> Cc: <chat@FreeBSD.ORG> Subject: FW: FTP almost gone now? (was: Re: IPFW almost works now.) Message-ID: <200106131539.LAA02461@khavrinen.lcs.mit.edu> In-Reply-To: <MFEFLELMIJGKDKPCJHAFEEGACDAA.pab@sysadmin-inc.com> References: <MFEFLELMIJGKDKPCJHAFEEGACDAA.pab@sysadmin-inc.com>
next in thread | previous in thread | raw e-mail | index | archive | help
I've redirected this discussion to -chat which is a more appropriate list now, since this really isn't FreeBSD-security material. <<On Wed, 13 Jun 2001 11:17:07 -0400, "Peter Brezny" <pab@sysadmin-inc.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106131539.LAA02461>