Re:Life beyond HTTP 1.1: Google’s SPDY
by drdaeman on Thursday April 07, 2011 @02:47PM
(#2420696)
Nice, but a bit worrysome. Is such binary protocol a Good Thing?
Ancient people — even though they hadn't much CPU, memory and network resources — in all their wisdom made high-level protocols text-oriented. Sure, they didn't consider everything (so we're still haunted with evil spirits of, for example, UTF-7 and quoted-printable), but overall design was simple yet perfectly functional. And anyone could use just a telnet client to talk to HTTP (FTP, SMTP, etc) server. With SPDY you can't do such thing anymore, you need specialized software.
I'm all for something like "Upgrade: SPDY"/"HTTP/1.1 101 Switching Protocols" (then binary framed message-oriented protocol goes into effect), but I somehow worried with binary-from-the-beginnig "HTTP 2.0". Maybe I'm just too conservative?
(Side question: If we want multiplexing streams so badly, why noone cares about SCTP? Is it flawed or inappropriate?)
Re:Life beyond HTTP 1.1: Google’s SPDY
by mbelshe on Thursday April 07, 2011 @08:13PM
(#2421820)
The reason we didn't like the Upgrade header is because it requires yet-another-round-trip in the protocol. Round trips are expensive, and getting worse both for desktops and mobile. (average RTT is ~114ms to Google, which has pretty good global presence)
As for SCTP, I think applications generally drive progress better than OSes do. Certainly the OSes have had enough time to sort out SCTP, but they haven't done it, and the end-game is nowhere in sight. Until there is an app that showcases it, will it ever happen?
My recommendation is to first prove new protocols at the application layer (perhaps run SCTP over UDP just to grease the skids). When people are addicted to how much better the experience is (multihoming + concurrent streams), then the OSes will pull it into the kernel to make it more scalable.
Re:Life beyond HTTP 1.1: Google’s SPDY
by wmf on Thursday April 07, 2011 @03:58PM
(#2420987)
The simplicity of text protocols is illusory and mostly leads to bad implementations that look like they work but don't really. Any protocol that supports multiplexing is fundamentally complex; for example, BEEP is a "text" protocol but I doubt you could speak it with telnet.
SPDY is always an upgrade; AFAIK there's no way to start out talking SPDY (since there's no spdy: scheme). Every SPDY server should still support old-fashioned HTTP.
SCTP gets broken by NATs, so outside of a few telco networks it's dead.
Re:Life beyond HTTP 1.1: Google’s SPDY
by mbelshe on Thursday April 07, 2011 @08:16PM
(#2421829)
Nobody questions that a secure protocol is not readable text :-)
I fundamentally believe the protocol has to be server authenticated and encrypted always. We've seen breach after breach of user privacy and the desire for governments to crack down on its citizens has no bound. We simply have to encrypt. Once we do that, text is off the table, and it doesn't really matter if it is binary or not.
Of course, we need much better tools for managing the encryption, I'm not a believer that the status quo is adequate in any way.
Re:Life beyond HTTP 1.1: Google’s SPDY
by mbelshe on Friday April 08, 2011 @10:43PM
(#2426339)
Alright, but that is just theory. The reason you'd want a text protocol is so that humans could read it. Once you secure the protocol, you can't read it without a machine to help you.
Re:Life beyond HTTP 1.1: Google’s SPDY
by drdaeman on Saturday April 09, 2011 @05:25AM
(#2426855)
Well, by the same reasoning I "can't" easily talk HTTP because I can't talk TCP, IP and 802.3 - they're all binary.
This is exactly why I wrote "high-level protocols". With just a telnet client I can talk HTTP, FTP, SMTP, IMAP, POP3, IRC and so on. And the machine just needs to handle lowel-level details.
Re:Life beyond HTTP 1.1: Google’s SPDY
by FooBarWidget on Thursday April 07, 2011 @03:22PM
(#2420856)
Yeah it's only simple in the sense that you can generate a packet with telnet. It's not so simple when you're trying to write a server that has to parse the stuff in a correct and secure manner.
Re:Life beyond HTTP 1.1: Google’s SPDY
by igrigorik on Thursday April 07, 2011 @06:17PM
(#2421443)
Disagree.. Having written both HTTP clients and servers, the SPDY spec is a breath of fresh air. Every packet has a predefined header length, and a clearly defined length for the trailing data - removes a heck of a lot of edge cases when implementing a parser.
Now if only TCP was message oriented... For that, I guess we have ZMQ.
Re:Life beyond HTTP 1.1: Google’s SPDY
by HerraBRE on Thursday April 07, 2011 @03:44PM
(#2420943)
I very frequently use netcat (or openssl s_client for HTTPS servers) to connect directly to a server I am debugging.
It could be argued that there is no "need" for this, but I find myself doing it quite frequently all the same. That may have something to do with the fact that I am developing a relatively low-level reverse HTTP proxy tool (PageKite), but I also did it quite a bit when working on more traditional webapps.
Once you speak the protocol it's nice to be able to just connect and chat with the server directly. :-) Humans are really bad at speaking binary.
Re:Life beyond HTTP 1.1: Google’s SPDY
by drdaeman on Thursday April 07, 2011 @03:31PM
(#2420890)
I don't know. Probably not, but it's sometimes convenient to do so.
Well, I've did so when I had to debug some redirect caching problem with "walled garden" setup. This could also be done with a more specialized software, though, I just happened to use telnet as it was readily available.
I also sometimes check server's availability (and overall response correctnes) by telnetting to it. Although, I was just too lazy to set up a tunnel to the LAN they're residing at.
Re:Life beyond HTTP 1.1: Google’s SPDY
by kaerast on Friday April 08, 2011 @03:21AM
(#2422833)
Whilst you can use more dedicated tools for debugging http connections than telnet, there is still an argument for protocols simple enough that you can use telnet.
Take Arduino for example, writing a naive but working http client is childs play; writing a SPDY client in Arduino is well beyond many people's capabilities. Yes libraries will appear eventually, but we've not even got a decent open http library yet.
Re:Life beyond HTTP 1.1: Google’s SPDY
by henryprecheur on Thursday April 07, 2011 @02:43PM
(#2420673)
I don't like SPDY. It's trying to solve a transport problem at the application level. Plus it seems to be quite complex.
I'd love to see Google promote a transport protocol like SCTP[1], and do HTTP over SCTP instead. If Google pushed SCTP a little bit, we might see it pop on Linux and Windows within a few years.
Re:Life beyond HTTP 1.1: Google’s SPDY
by dchest on Thursday April 07, 2011 @02:51PM
(#2420719)
"Q: What about SCTP?
A: SCTP is an interesting potential alternate transport, which offers multiple streams over a single connection. However, again, it requires changing the transport stack, which will make it very difficult to deploy across existing home routers. Also, SCTP alone isn't the silver bullet; application-layer changes still need to be made to efficiently use the channel between the server and client."
Re:Life beyond HTTP 1.1: Google’s SPDY
by henryprecheur on Thursday April 07, 2011 @04:51PM
(#2421149)
I agree that SPDY would be a "quicker" solution. Just modify the browsers and wait a year or two, and 30%+ of the people browsing the web will have it.
SCTP have the nice side effect of improving things like streaming, and games.
As for application-layer changes, I don't think it would be too difficult to do, kind of like ipv6 (I don't have anything to back this up, it's just a hunch).
SCTP deployment will much longer than SPDY, but SCTP seems to be the "right thing to do". Not only for the web, but for other things that use the network. Internet is not only http://.
UPDATE: I just realized that saying that the transition to SCTP will be like IPv6 isn't necessarily a good point for SCTP :-D ... I guess I'm a purist and not a pragmatist.
Re:Life beyond HTTP 1.1: Google’s SPDY
by igrigorik on Thursday April 07, 2011 @02:53PM
(#2420727)
SCTP addresses some of the same needs (primarily the multiplexing), but the major hurdle there is the fact that we're ditching TCP. As far as an upgrade path goes: it is much harder to get existing servers to support SCTP (think about Apache, Nginx, etc), then to bolt on support for a different application-level protocl (replace/augment HTTP with SPDY).
Re:Life beyond HTTP 1.1: Google’s SPDY
by piotrSikora on Thursday April 07, 2011 @03:39PM
(#2420927)
I disagree. It's much, much easier to support SCTP (since it's already provided by the operating system) than it is to support SPDY with all the server pushes, etc.
But to be honest, I don't know what was the source of such comparison... It's apples to oranges.
Re:Life beyond HTTP 1.1: Google’s SPDY
by mbelshe on Thursday April 07, 2011 @07:55PM
(#2421762)
SCTP is not available on Windows by default, and you need administrative privileges to deploy it. I'm not trying to start an OS war debate, but this is a very practical problem.
Mobile, oddly enough, may be the best route to bring both IPv6 and SCTP to life.
Re:Life beyond HTTP 1.1: Google’s SPDY
by Lennie on Tuesday April 12, 2011 @03:37PM
(#2438806)
Well, the primary reason for the existence of SPDY is encryption everywhere and speed. Something which with current HTTP/HTTPS doesn't really exist. HTTPS is still slower than HTTP and HTTP is slower than SPDY.
A lot of the speed increase comes from the use of multiplexing. So without it, it wouldn't be able to achieve most of it's goals.
Re:Life beyond HTTP 1.1: Google’s SPDY
by mbelshe on Thursday April 07, 2011 @07:53PM
(#2421754)
SCTP is a good start for sure, and someday may make sense. The problem is a deployment one: it can't pass through NAT, making it off limits to most users today.
As for solving problems from the transport, that is not true. I assume you're suggesting that streams can only be tackled at the transport layer, but SPDY's compression is clearly an app-level endeavor.
Re:Life beyond HTTP 1.1: Google’s SPDY
by snprbob86 on Friday April 08, 2011 @02:11AM
(#2422682)
Wow! When they removed the "http:// from Chrome, I knew exactly why they were doing it: to hide the SDPY rollout while simultaneously not breaking copy paste interop with non-Chrome uses. However, I had no idea they had already done it! Amazingly clever and effective. I totally saw it coming and then totally missed it's arrival. Awesome.
Re:Life beyond HTTP 1.1: Google’s SPDY
by mbelshe on Friday April 08, 2011 @10:48PM
(#2426347)
No, this is pure conspiracy theory. :-)
The decision to drop "http:// from the display was a UI decision and had nothing to do with the internals. The idea is that the "http:// is just user-confusion. Most users can't spell HTTP, much less know why it is there. Why do we subject our poor users to it? Personally, I don't care.
Chrome does not recognize "spdy://" as a protocol scheme, and the UI display changes nothing with respect to how chrome selects protocols.
Re:Life beyond HTTP 1.1: Google’s SPDY
by igrigorik on Thursday April 07, 2011 @03:48PM
(#2420953)
Hmm, that's good catch - thanks. HTTP 1.0 didn't explicitly specify anything around persistent connections, so in practice you can add Keep-Alive header and hope that the server will respect it. By comparison, HTTP 1.1 defaults to persistent always and requires a "Connection: close" header to indicate otherwise.
Re:Life beyond HTTP 1.1: Google’s SPDY
by VladRussian on Thursday April 07, 2011 @02:34PM
(#2420634)
great thing is that Google has enough gravitational mass to move world in such direction without many years delay of negotiations inside protocol specification committee.
Once everybody is onboard, when the license fee will be requested?
Re:Life beyond HTTP 1.1: Google’s SPDY
by billpg on Friday April 08, 2011 @08:52AM
(#2423509)
I wonder if the better plan would be to insert another layer between TCP and HTTP (or any app layer protocol) that provides for multiple streams between the same points.
Re:Life beyond HTTP 1.1: Google’s SPDY
by mbelshe on Friday April 08, 2011 @10:51PM
(#2426357)
That's basically what SPDY is. It has two halves, a framing layer (which is generic), and a definition of how to embed HTTP within that framing layer. In theory, you could use the framing layer for other purposes, but we designed it tailor-made for http.
For the original question - HTTP can only send one request at a time. SPDY can send many all at the same time, avoiding lots of round trips. As a side effect, it sends fewer bytes and packets too. look for the IETF slides for the latest data.
Re:Life beyond HTTP 1.1: Google’s SPDY
by trezor on Friday April 08, 2011 @02:19AM
(#2422700)
The title seems to imply HTTP 1.1 is already dead/abondoned, when in fact almost nobody except Google is supporting SPDY.
Firefox doesn't support it, but if it's open enough there's a chance they might add support for it. MSIE support is far away and I wouldn't but any bets on it being supported any time this year. If SPDY is supposed to be more than a http-option (i.e. "beyond http 1.1") all clients need to support it. That's far from the case today.
Given that last time I heard about it was quite some time ago and little has changed, I would say a better title would be "Http-times: SPDY is still around, still looking for friends".
Just because it comes out of Google's door doesn't make anything a guaranteed success and I outside HN's usual Google-praising sphere I haven't ever heard a single geek mention it. I'm not saying it's dead either, but at this point it seems to have gathered very little interest and momentum.
Ancient people — even though they hadn't much CPU, memory and network resources — in all their wisdom made high-level protocols text-oriented. Sure, they didn't consider everything (so we're still haunted with evil spirits of, for example, UTF-7 and quoted-printable), but overall design was simple yet perfectly functional. And anyone could use just a telnet client to talk to HTTP (FTP, SMTP, etc) server. With SPDY you can't do such thing anymore, you need specialized software.
I'm all for something like "Upgrade: SPDY"/"HTTP/1.1 101 Switching Protocols" (then binary framed message-oriented protocol goes into effect), but I somehow worried with binary-from-the-beginnig "HTTP 2.0". Maybe I'm just too conservative?
(Side question: If we want multiplexing streams so badly, why noone cares about SCTP? Is it flawed or inappropriate?)
As for SCTP, I think applications generally drive progress better than OSes do. Certainly the OSes have had enough time to sort out SCTP, but they haven't done it, and the end-game is nowhere in sight. Until there is an app that showcases it, will it ever happen?
My recommendation is to first prove new protocols at the application layer (perhaps run SCTP over UDP just to grease the skids). When people are addicted to how much better the experience is (multihoming + concurrent streams), then the OSes will pull it into the kernel to make it more scalable.
What do you think?
SPDY is always an upgrade; AFAIK there's no way to start out talking SPDY (since there's no spdy: scheme). Every SPDY server should still support old-fashioned HTTP.
SCTP gets broken by NATs, so outside of a few telco networks it's dead.
I fundamentally believe the protocol has to be server authenticated and encrypted always. We've seen breach after breach of user privacy and the desire for governments to crack down on its citizens has no bound. We simply have to encrypt. Once we do that, text is off the table, and it doesn't really matter if it is binary or not.
Of course, we need much better tools for managing the encryption, I'm not a believer that the status quo is adequate in any way.
This is exactly why I wrote "high-level protocols". With just a telnet client I can talk HTTP, FTP, SMTP, IMAP, POP3, IRC and so on. And the machine just needs to handle lowel-level details.
Now if only TCP was message oriented... For that, I guess we have ZMQ.
It could be argued that there is no "need" for this, but I find myself doing it quite frequently all the same. That may have something to do with the fact that I am developing a relatively low-level reverse HTTP proxy tool (PageKite), but I also did it quite a bit when working on more traditional webapps.
Once you speak the protocol it's nice to be able to just connect and chat with the server directly. :-) Humans are really bad at speaking binary.
Well, I've did so when I had to debug some redirect caching problem with "walled garden" setup. This could also be done with a more specialized software, though, I just happened to use telnet as it was readily available.
I also sometimes check server's availability (and overall response correctnes) by telnetting to it. Although, I was just too lazy to set up a tunnel to the LAN they're residing at.
Take Arduino for example, writing a naive but working http client is childs play; writing a SPDY client in Arduino is well beyond many people's capabilities. Yes libraries will appear eventually, but we've not even got a decent open http library yet.
It requires fewer keystrokes :P
I'd love to see Google promote a transport protocol like SCTP[1], and do HTTP over SCTP instead. If Google pushed SCTP a little bit, we might see it pop on Linux and Windows within a few years.
[1]:http://en.wikipedia.org/wiki/Stream_Control_Transmission_Pro...
A: SCTP is an interesting potential alternate transport, which offers multiple streams over a single connection. However, again, it requires changing the transport stack, which will make it very difficult to deploy across existing home routers. Also, SCTP alone isn't the silver bullet; application-layer changes still need to be made to efficiently use the channel between the server and client."
http://www.chromium.org/spdy/spdy-whitepaper
SCTP have the nice side effect of improving things like streaming, and games.
As for application-layer changes, I don't think it would be too difficult to do, kind of like ipv6 (I don't have anything to back this up, it's just a hunch).
SCTP deployment will much longer than SPDY, but SCTP seems to be the "right thing to do". Not only for the web, but for other things that use the network. Internet is not only http://.
UPDATE: I just realized that saying that the transition to SCTP will be like IPv6 isn't necessarily a good point for SCTP :-D ... I guess I'm a purist and not a pragmatist.
Present-day GNU/Linux should work with IPPROTO_SCTP, it's only Windows who lack the implementation out of the box.
My non-GNU Linux system talks SCTP just fine.
But to be honest, I don't know what was the source of such comparison... It's apples to oranges.
Mobile, oddly enough, may be the best route to bring both IPv6 and SCTP to life.
But those are two very different problems ;)
Personally, I consider "server pushes" as the main feature and "full encryption and compression" as nice improvements.
A lot of the speed increase comes from the use of multiplexing. So without it, it wouldn't be able to achieve most of it's goals.
As for solving problems from the transport, that is not true. I assume you're suggesting that streams can only be tackled at the transport layer, but SPDY's compression is clearly an app-level endeavor.
Anyone know a good way of running a packet sniffer on OS X so I can see it in action?
http://wireshark.org or brew install wireshark
The decision to drop "http:// from the display was a UI decision and had nothing to do with the internals. The idea is that the "http:// is just user-confusion. Most users can't spell HTTP, much less know why it is there. Why do we subject our poor users to it? Personally, I don't care.
Chrome does not recognize "spdy://" as a protocol scheme, and the UI display changes nothing with respect to how chrome selects protocols.
sudo tcpdump -s3000 -X -i en1 port 80
switch to -i en0 if you're using your ethernet, or you have a macbook air.
Keep-alive was a feature of HTTP/1.0 and was phased out in HTTP/1.1 in favour of "persistent connections."
Alternatively, there is work on sending an "upgrade" header in your regular HTTP response: http://code.google.com/p/chromium/issues/detail?id=69688
The NPN route is obviously the best in terms of performance, since the protocol can be negotiated as part of the TLS handshake..
Long story short: you can definitely run your own SPDY server and Chrome will auto-detect and use the protocol.
If you have any trouble, please hop on to the [email protected] mailing list for help.
It looks like SPDY-enabled clients check for SPDY implentations first (which fails very quickly if absent) and then fails over to HTTP.
Edit: already found it https://bugzilla.mozilla.org/show_bug.cgi?id=spdy
Once everybody is onboard, when the license fee will be requested?
Also when you have only 1 connection you might better utilize the bandwidth you have because of TCP's slow-start algo.
(If that's exactly what SPDY is, never mind.)
For the original question - HTTP can only send one request at a time. SPDY can send many all at the same time, avoiding lots of round trips. As a side effect, it sends fewer bytes and packets too. look for the IETF slides for the latest data.
Firefox doesn't support it, but if it's open enough there's a chance they might add support for it. MSIE support is far away and I wouldn't but any bets on it being supported any time this year. If SPDY is supposed to be more than a http-option (i.e. "beyond http 1.1") all clients need to support it. That's far from the case today.
Given that last time I heard about it was quite some time ago and little has changed, I would say a better title would be "Http-times: SPDY is still around, still looking for friends".
Just because it comes out of Google's door doesn't make anything a guaranteed success and I outside HN's usual Google-praising sphere I haven't ever heard a single geek mention it. I'm not saying it's dead either, but at this point it seems to have gathered very little interest and momentum.