# gzip outgoing HTML/CSS/JS.
if (req.url ~ "\.(html|css|js)(\?v=\d+)?$" &&
beresp.http.content-type ~ "text") {
set beresp.do_gzip = true;
}
So far, it looks good. I see static content is responding to gzip requests, and varnishd's CPU is not crazy higher. It might be up a bit, but it still gets lost in the noise of the Perlbals.
I'm going to be offline for the next ~24 hours. If something is wrong, you can revert the above section from lb02's /etc/varnish/default.vcl and run /root/bin/reload-varnish-config on that machine. (I'm quite sure you know all that, but meh.)
Edit: This doesn't really compress most of our web output. Just the static files. It'd be nice to figure out if we can compress our HTML output, although pattern-matching all of that might be interesting.
We should probably make it a compression-opt-out instead of choosing what to compress. That way we just have to match the media URLs and also PNG, GIF, JPG, etc.
no subject
EXCITEMENT. Added to the config:
# gzip outgoing HTML/CSS/JS. if (req.url ~ "\.(html|css|js)(\?v=\d+)?$" && beresp.http.content-type ~ "text") { set beresp.do_gzip = true; }So far, it looks good. I see static content is responding to gzip requests, and varnishd's CPU is not crazy higher. It might be up a bit, but it still gets lost in the noise of the Perlbals.
I'm going to be offline for the next ~24 hours. If something is wrong, you can revert the above section from lb02's /etc/varnish/default.vcl and run /root/bin/reload-varnish-config on that machine. (I'm quite sure you know all that, but meh.)
Edit: This doesn't really compress most of our web output. Just the static files. It'd be nice to figure out if we can compress our HTML output, although pattern-matching all of that might be interesting.
We should probably make it a compression-opt-out instead of choosing what to compress. That way we just have to match the media URLs and also PNG, GIF, JPG, etc.