by Animats · 11y ago · 0 comments
<a href="https://example.com/file.zip"
integrity="ni:///sha256skjdsfkafinqfb...ihja_gqg?ct=application/octet-stream"
download>Download!</a>
This also applies to IMG, EMBED, LINK, etc - any content.This is a huge win for caching systems. Any cache in the path from browser to server, seeing that, can use a cached version of the content. Because cache content validity is defined by the sha256 hash, there's no cache expiration time issue. You can load JQuery once and use it all week. Caching systems can even index their cache by hash, and deliver data loaded from a different site. What a cache cannot do is change even one bit of the content. Such data tampering will be caught by the browser. (W3C is trying to figure out what to do about streaming data.)
As for "bufferbloat", that's usually mis-identifying the problem. The real problem is usually bad queue ordering at a choke-point router. FIFO queuing at a choke point will not work well. At a router where there's significantly less outgoing bandwidth than incoming bandwidth, you need some kind of fair queuing, so that big flows don't starve out little ones. Most Cisco routers support that. On the other hand, there's nothing wrong with buffering up lots of content for a single flow if you have the space. If you're loading a big image or a video stream, temporarily stashing a full TCP window of it in the router is just fine. It will be delivered and will play out eventually.
Ideally, you'd like full fair queuing, but it's somewhat computationally expensive. There are approximations to fair queuing that work reasonably well, and are being designed into DOCSIS cable routers. See (http://people.cs.clemson.edu/~jmarty/AQM/AQM-DOCSIS.pdf) If you're using expensive bandwidth like a satellite channel to an aircraft, you definitely need something smarter than FIFO.
(I used to work on network congestion, a long time ago. See RFC 970, 1985. https://tools.ietf.org/html/rfc970)
So, in the style of most web intermediates, they're trying to do this at the HTTP level. Which doesn't work well for HTTPS requests. One of the annoying features of HTTPS is that there's no standard way for a site to say "I don't speak HTTPS". I run a crawler, and responses to HTTPS requests include timing out, sending non-HTTPS data confusing the SSL/TLS layer, and refusing to open a TCP connection.
About the most legit thing they might do is open an HTTPS connection using a cert signed for a domain name such as "YOUTUBE-IS-BLOCKED-BECAUSE-YOU-ARE-ON-AN-AIRPLANE.NET". The HTTPS open will fail due to domain mismatch, and the browser popup will have some useful info. If the user actually lets the connection open, they can be given a page on why satellite links don't have enough bandwidth to let everyone on a plane watch cat videos.
In the interim, fq_codel (which combines fq and aqm) now dominates the field of 3rd party firmware and home routers. It turns out that FQ nor AQM are computationally intense anymore, but software rate limiting, is.