-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compress the source when posting to build server #85
Comments
Yeah, I've been meaning to add HTTPS for a while, especially since AWS apparently makes that easy now. |
Another thing one could do is to assume that the build server has a copy of the html repo, and only send a diff against the merge-base with whatwg/html. A bit elaborate, of course, and the next bottleneck would be sending the output back. |
Could we use dropbox for this, or some similar service? https://www.dropbox.com/help/8 |
Unfortunately, as tested with Wireshark in whatwg/html-build#64 (comment) there is no automatic compression at the TLS layer. |
So, just to break this down and see where the low hanging fruit is, here's what we send:
The returned Potential compression in total is from ~7.2 MB to ~1.4 MB, and we only need to fiddle with the posted data. |
As for the imagined automatic compression of TLS, a colleague has educated me, and while it's part of the protocol it's been turned off in browsers because of the security issues, "adaptive chosen plaintext attacks." Even if we can get it to work with curl, it's probably not a long-term safe bet. So, @domenic, do you think you could add support for a |
The TLS spec does support compression, but is considered bad as it opens up for attacks. Compression attacks belong in "adaptive chosen plaintext" category though, which means you need to somehow control part of what the agent sends. This is hard to conduct, and mostly browsers are vulnerable. However, since it's considered harmful I wouldn't use it, as it is or will most likely be turned off in whatever TLS stack you are using. |
@haavardmolland informs me that HTTP2 compresses (almost) everything, so that would be an option. curl has a |
I would love to make my build server http2 aware. I will try to figure that out over the next day or two. |
I've noticed that even though my curl binary has a This would limit compression to very bleeding edge curl installs, if it's ever enabled by default. Not sure how to deal with this, seems like compressing ourselves would be the only way to benefit most users of html-build :( |
Are you sure it's not just failing because my server doesn't support that protocol? |
I'm pretty sure, yes, because it fails fast and running with verbose output it doesn't seem to even try connecting.
Some relevant web search finds: |
OK. That is very sad. But I can work on adding support for a zip body instead of a multipart body then; simple enough. I will probably do switching on Content-Type first (application/zip => zip path) and then after a few weeks remove support for non-zip. Alternately I could add a new endpoint (/v2/wattsi or /wattsi-zipped or similar) but it's probably not worth worrying about at this point. I do wish we had whatwg/html-build#53 in place though. |
Just uploading the source accounts for the majority of the build time when you're on a slow network.
https://tools.ietf.org/html/rfc2388#section-5.1 says "do it yourself", so I see two options:
sourcegz
field or something that takes the compressed source instead.I think HTTPS makes sense, for other obvious reasons as well.
The text was updated successfully, but these errors were encountered: