Varnish Author Suggests SPDY Should Be Viewed As a Prototype
An anonymous reader writes "The author of Varnish, Poul-Henning Kamp, has written an interesting critique of SPDY and the other draft protocols trying to become HTTP 2.0. He suggests none of the candidates make the cut. Quoting: 'Overall, I find the design approach taken in SPDY deeply flawed. For instance identifying the standardized HTTP headers, by a 4-byte length and textual name, and then applying a deflate compressor to save bandwidth is totally at odds with the job of HTTP routers which need to quickly extract the Host: header in order to route the traffic, preferably without committing extensive resources to each request. ... It is still unclear for me if or how SPDY can be used on TCP port 80 or if it will need a WKS allocation of its own, which would open a ton of issues with firewalling, filtering and proxying during deployment. (This is one of the things which makes it hard to avoid the feeling that SPDY really wants to do away with all the "middle-men") With my security-analyst hat on, I see a lot of DoS potential in the SPDY protocol, many ways in which the client can make the server expend resources, and foresee a lot of complexity in implementing the server side to mitigate and deflect malicious traffic.'"
Parsing a HTTP session with multi-part mime attachments using chunked encoding is murderous. Now true, many people don't have to worry about this, but the fact is the protocol leaks like a sieve. For instance, you can't send a header after you've entered the body of the HTTP session. You can't mix chunked-length encoded elements with fixed content-length elements with HTTP1.1. Once you've sent your headers and encoding, you're screwed. The web has a solution - AJAX, but then you need JavaScript.
I'd be all for something new. I'd suggest base it on XML with a header section and header-element to get the transfer started then accept any kind of structured data including additional header elements. With this, you can still use HTTP headers for back-wards compatibility, but once recognized as "HTTP 2.0" the structured XML can be used to set additional headers, etc. With the right rules, you can send chunks of files or headers in any arbitrary order and have them reconstructed.
Slashdot's rate-of-post filter: Preventing you from posting too many great ideas at once.
For instance identifying the standardized HTTP headers, by a 4-byte length and textual name, and then applying a deflate compressor to save bandwidth is totally at odds with the job of HTTP routers which need to quickly extract the Host: header in order to route the traffic, preferably without committing extensive resources to each request. ...
It seems to me that routing based on header is doing entirely the wrong thing. In any case, according to wikipedia:
TLS encryption is nearly ubiquitous in SPDY implementations
Which rather makes routing on content infeasible (OK you can forward route behind the SSL endpoint, but this doesn't seem to be what he's talking about)
That's been fixed with TLS+SNI, which has broad support. SSL (as opposed to TLS) should be effectively dead as a support requirement by now.
tasks(723) drafts(105) languages(484) examples(29106)
So, because you would have to design new security tools and think a different way in order to make it sure, does that make it flawed? Does this mean we are no longer free to innovate unless it fits into some mold? That is just stupid. If someone comes up with a new way of doing things, put on your REAL security hat and come up with a way to secure it, don't just spread FUD about how it is BAD!!
"My immediate reaction is "WTF? What kind of moron doesn't make things 64-bit safe to begin with?" Linus
Much of what the web has become is no longer fitting the "fetch a document" model that HTTP (and GOPHER before it) are designed to do. This is why we have hacks like cookie managed sessions. We are effectively treating the document as a fat UDP datagram. The replacement ... and I do mean replacement, for HTTP, should integrate the session management with it, among other things. The replacement needs to hold the TCP connection (or better, the SCTP session), in place as a matter of course, integrated into the design, instead of patched around as HTTP does now. With SCTP, each stream can manage its own start and end, with a simpler encryption startup based on encrypted session management on stream 0. Then you can have multiple streams for a variety of serviced functions from nailed up streams for continuous audio/video, to streams used on the fly for document fetch. No chunking is needed since it's all done in SCTP.
now we need to go OSS in diesel cars
According to the link, IE on Windows XP does not support TLS+SNI -- including IE 8.
Until this is fixed or sufficient number of people migrate to a newer OS, TLS+SNI is still not viable for most websites.
Then it cannot replace HTTP and should be withdrawn, or it's been wrongfully sorted in under "HTTP/2.0 Proposals"
If someone proposed HTTP today, it wouldn't pass muster by these experts either. And I doubt that any of these new protocols really would make much of a difference anyway. The infrastructure has been built around HTTP, everybody knows how to compress it and everybody knows how to deal with the kind of multiple connections that it requires. If anything additional is really needed, it could be expressed as hints to the server and the intermediate infrastructure without starting from scratch.
As a static data format its just about passable, but as a low overhead network protocol??
Wtf have you been smoking??
This is one of the things which makes it hard to avoid the feeling that SPDY really wants to do away with all the "middle-men"
Half the human race is middle-men, and they don't take kindly to being eliminated.
So what should operators of small web sites do in the 21 months between now and when Microsoft agrees to let XP die? Now that IPv4 addresses have become scarce, and home ISPs still haven't been pushing IPv6, shared hosting companies are able to charge double for the dedicated IP addresses needed to run SSL 3.0. Besides, Android 2.x devices are still being sold, and their SSL stack doesn't support SNI either.
That's what you get when someone designs a protocol and then someone ELSE decides to change it in different ways of thinking. If the first one was well designed, changes should end up looking like they were part of the original. If the first one was poorly designed, make a whole new one.
now we need to go OSS in diesel cars
JSON can also be validated against a schema, where the schema consists of a JavaScript file implementing isValid(parsed_object).
Wouldn't it be better to have the browser support zip/tarball path.
Now
would look thru the zip file.
I suppose there could be some security issues here, but it seems like it would be easier than chunking protocols if not much faster.
Further ...
Now we've got cached apps as well.
I'd suggest base it on XML with a header section and header-element to get the transfer started then accept any kind of structured data including additional header elements.
Haven't we learned enough already from industrial pain to stay away from XML? JSON, BSON, YAML, compact RELAX NG, ASN.1, extended Backus-Naur Form. Any one of them, or something inspired by any (or all) of them, that is compact, unambiguos (there should be only one canonical form to encode a type), not necesarily readable, possibly binary, but efficiently easy to dump into an equally compact readable form. Compact and easy to parse/encode, with the lowest overhead possible. That's what one should look for.
But XML, no, no, no, for Christ's sake, no. XML was cool when we didn't know any better and we wanted to express everything as a document... oh, and the more verbose and readable, the better!!(10+1). We really didn't think it through that much back then. Let's not commit the same folly again, please.
I was the member of the IETF committee that proposed the standard (while working for Microsoft), and I agree its not very good but I can tell you that getting standards through various bodies is more politics than technology. Late in the cycle we tried to change it to XML but people thought we (MS) were playing mind games with the committee so the idea was abandoned
HTTP 2.0 is not going to happen for a long time. SPDY is here now and both Firefox and Chrome support it.
But, the only companies using it are Google and Twitter. I'd like to see web hosting companies offer it as a service
Why are we discussing SSL? The guy who develops Varnish has said that SSL is a mess, OpenSSL is a confusing and terrifying mess, and SSL is bad because he doesn't understand the code.
https://www.varnish-cache.org/docs/trunk/phk/ssl.html
First, I have yet to see a SSL library where the source code is not a nightmare.
As I am writing this, the varnish source-code tree contains 82.595 lines of .c and .h files, including JEmalloc (12.236 lines) and Zlib (12.344 lines).
OpenSSL, as imported into FreeBSD, is 340.722 lines of code, nine times larger than the Varnish source code, 27 times larger than each of Zlib or JEmalloc.
This should give you some indication of how insanely complex the canonical implementation of SSL is.
Second, it is not exactly the best source-code in the world. Even if I have no idea what it does, there are many aspect of it that scares me.
Translation: SSL libraries are big and scary, SSL is big and confusing and I have no idea what the hell it does so it's bad.
Support my political activism on Patreon.
SPDY is encrypted by design. There is no option for middle-men, and frankly, that is the way I like it myself, as i would assume most people. I don't like when devices mess with my traffic.
As for most of the other complaints - given than Google is running SPDY just fine on all of it's servers, and they're basically one of the largest (if not the largest) hosts on the internet, I think they are all strawmen. If it is working for Google then it will work for others.
My experience using SPDY, as a user, is nothing short of spectacular. The performance gains in on Google properties with SPDY are incredible and very noticeable.
Conspiracy minded folks would think that SPDY is mainly about Google being able to ensure that advertisements are served before the content. Putting it inside of SSL also ensures that any intermediate carriers won't be stripping Google's adverts.
Just use firefox or chrome in XP, problem solved
Higuita
The problem all of these HTTP 2.0 proposals are trying to work around is the fact that each resource fetched by the web browser is handled via a separate connection. By combining these elements into a single (compressed) stream you can save a TON of overhead. This is why sites that use nothing but data::URI images load so much faster--even--than sites using the fastest CDNs. These 'solutions' are just workarounds to the crap that is HTTP 1.1.
Of course, the problem with data::URIs is that they can't be cached if the page's content is dynamic. However, the fact that you don't have to open a hundred additional HTTP connections just to load the cached content (have to check if something changed!) more than makes up for the lack of caching.
The real solution here is to just ditch HTTP and replace it with something like SCTP which can keep the connection open to the server and maintain the session in a secure fashion (negating the need for session-tracking cookies, hurray!). Having said that, such a change to the web would completely break the popular, N-servers-behind-a-load-balancer architecture. It would also negate the need for CDNs (for the most part)... Which is probably why many of the big-name vendors are proposing solutions that maintain the status quo.
-Riskable
"Those who choose proprietary software will pay for their decision!"
Translation: SSL libraries are big and scary, SSL is big and confusing and I have no idea what the hell it does so it's bad.
Actually, the better argument I've heard is that it OpenSSL is very poorly documented. And I've heard this complaint from numerous people...to the point where some even started looking into fresh implementations.
tasks(723) drafts(105) languages(484) examples(29106)
But really any format that can express structured data is endorsed by me. I do not have a problem with JSON, in fact it is my 2nd favorite. My first favorite is Python's style, which is very, very close to JSON. But JSON has the advantage that web people already know it.
Please don't get bogged down with XML, I wrote XML into my post because despite what you all think, it's not that bad to parse, provided that you use a stream-reader style rather than SAX or DOM. The other reason why I wrote XML is because it does not pre-suppose any kind of scripting engine, so people would not be tempted to use code which would require a JavaScript interpreter, which would end up being a really bad idea.
XML, JSON, Python can all express structured data. They are all equally valid and anything expressed in one can be converted between them all.
Slashdot's rate-of-post filter: Preventing you from posting too many great ideas at once.
I have heard the complaint from numerous folks that SSL libraries really are a mess, which is why periodically we get nasty vulnerabilities in them; supposedly, auditing the code is an exercise in futility.
Conspiracy minded folks would think that SPDY is mainly about Google being able to ensure that advertisements are served before the content. Putting it inside of SSL also ensures that any intermediate carriers won't be stripping Google's adverts.
It also improves user's privacy by preventing personal content from being read by ISPs, proxies, and other men-in-the-middle. If any other web site turned on SSL, we would thank them for choosing to improve user's privacy. But this is Google, so it must be a bad thing.
Google turned on SSL for search a month before they launched personalized search, where the search results can include things only the logged-in user has permission to see (if the user logs in and enables it). If they had not enabled SSL, people would (rightly) be upset that any man in the middle could see photos, documents, and G+ posts shared only with you.
If you punish companies for doing the right thing, expect them to stop. Every company has people for and against any idea. When you punish good behavior, the people who fight for it will not win the argument next time.
half of the purpose of a schema -- being a human-readable documentation of the data format
That purpose can be achieved with English.
Schema validation is a very clear example of a situation where it's not good to have a Turing-complete language.
If you specifically don't want something Turing complete when processing XML, then why do XML fans use XSLT despite its being Turing complete?
the user will use a browser which is supported. Imagine google only working with sni.
What is the sound of millions of users abandoning Google? "Bing."
For those who do read the article and didn't understand what the debate was about. Here is a good slide show from google about the advantages of SPDY. Which also explicate the issues in "HTTP routers" in the article: http://www.slideshare.net/bjarlestam/spdy-11723049
but then you have to write the schema AND document it. This can (and does) lead to documentation being out of sync with the code.
It's not much different from a C# implementation of a mobile application for Windows Phone 7 falling out of sync with the Objective-C implementation of the same application for iOS. Or what am I missing?
Within a year, most end-users (in the US) will have access to IPv6 from their ISP. Within two years, most end-users will have replaced their non-IPv6 CPEs with ones which support IPv6.
So in other words, IPv6 from the backbone to a home PC's 802.11g radio will be deployed around the time the last mainstream non-SNI PC operating system is scheduled to die anyway.
Me, I'd probably drop support for XP, and let the end-user click through a cert warning if that's what they're inclined to do.
So how would you explain to the users that a blog, forum, or wiki is supposed to raise a serious certificate error after the user is logged in, and that HTTPS with such a serious error is safer for the user than an HTTP connection that can be Firesheeped?
How much more per month are we talking about for a dedicated IP, anyway?
The difference between $5 per month name-based shared hosting, which may put a thousand or more domains on one IPv4 address, and a VPS. You mention a $5 to $7 per month VPS plan; which provider do you recommend?
Seems cheap to me, especially compared to what joe already spent to get a valid SSL cert.
Personal use SSL certificates have been free of charge from StartCom for some time now.
As far as Android...a number of websites are pushing their users to use simple apps instead of the Android browser.
This is true of major web sites like Facebook, eBay, Amazon, and the like, where only one company hosts a particular web application code base. But a lot of smaller web sites run open source web applications, customized with plug-in modules, on top of interchangeable LAMP servers. Is there a standard WordPress app, a standard phpBB 3 app, or a standard MediaWiki app? (I'd Google it, but I'm composing this post offline.) Or must each web site operator duplicate effort in developing an Android app from scratch in parallel with the web site and then walking the users through turning on Unknown sources?
After April 2014, Microsoft will refuse to supply security updates for Windows XP. Security holes will be discovered, documented, and exploited to the point where connecting an XP machine to the Internet is an invitation to get owned. "If you run XP, you will be hacked." How is that not enough to discourage people from continuing to use XP?
Putting it inside of SSL also ensures that any intermediate carriers won't be stripping Google's adverts.
Why is that a bad thing? I dont think any intermediary is currently stripping of google ads, and I would rather strip them myself if I had to, rather than depend on any intermediary. Host file list will still work, browser side stripping will continue to work too. I seriously do not see the downside for this.
Ahh... so google properties have converted to this ..
I wondered why my browser turns to crap and hangs on google so often.
That's assume the sites work at all -- so far, google groups has gone completely dark for me... nothing comes up but a input line asking for
groups... but nothing will come up... all javascript enabled, and nothing blocked, yet it doesn't work anymore...
You might look at your assumptions about how well it works...
Lemme guess your browser -- 'Chrome'?
Is crap like this (to watch a stupid badger video on forbes.com, you have to load [i.e. trial & error with NoScript] JavaScript from around 25 external websites - pure idiocy). Better implement a feedback mechanism inside browsers that lets web developers who do these things know their website is a slow pile of turd and forget about the useless SPDY that totally misses the point.
"I love my job, but I hate talking to people like you" (Freddie Mercury)