per-entity - Re: [Per-Entity] HTTP Compression
Subject: Per-Entity Metadata Working Group
List archive
- From: Rhys Smith <>
- To: Per-Entity Metadata Working Group <>
- Subject: Re: [Per-Entity] HTTP Compression
- Date: Wed, 19 Oct 2016 05:21:01 +0000
- Accept-language: en-GB, en-US
- Ironport-phdr: 9a23:s8dYwxN7lCFL4Zmlvrkl6mtUPXoX/o7sNwtQ0KIMzox0KP75rarrMEGX3/hxlliBBdydsK0UzbeN+Pm9EUU7or+/81k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i76xXcoFx7+LQt4IPjuUs6X1pzvlrP6x5qGWwhSwRe7fbJuPV2ToBnYusAKiMNdLbwyyx3G6lRSfPlOjTdwKEjWkhDg59uh1J9l+CNVvvUnsclaXvOpUb4/SOliDCU9e1sw5dHr/U35TRqUoEAZU3kWuhhJGAOD5Rq8Q5Sn4XiyjfZ0xCTPZZ6+drszQzn3qv4zEBI=
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Just replied on FOG. UKf planning on turning this on shortly.
metadata.ukfederation.org.uk currently doesn’t have it on,
metadata-test.ukfederation.org.uk does, if you want to test, Tom.
We’re creating the gzip version when we push to the servers, and using mod
rewrite to serve the gzip version if the header is present.
Apache config snippet:
<Directory /var/www/html/metadata-test.uou>
Require all granted
#
# If requests come in for an XML file and the client has
# said they support gzip, send them the gzipped version
#
AddEncoding gzip .gz
RewriteEngine On
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteRule ^(.*)\.xml$ $1\.xml\.gz [L]
#
# Apply appropriate settings to individual files.
#
<FilesMatch ".+\.xml$">
AddType application/samlmetadata+xml .xml
</FilesMatch>
<FilesMatch ".+\.xml\.gz$">
RemoveType .gz
AddType application/samlmetadata+xml .xml
</FilesMatch>
</Directory>
D/ling without compressiont:
allstar:~ rhys$ curl -I
http://metadata-test.ukfederation.org.uk/ukfederation-metadata.xml
HTTP/1.1 200 OK
Date: Wed, 19 Oct 2016 05:14:42 GMT
Server: Apache/2.4.6 (Red Hat Enterprise Linux)
Last-Modified: Tue, 18 Oct 2016 16:07:44 GMT
ETag: "1a6b7c9-53f25e487d400"
Accept-Ranges: bytes
Content-Length: 27703241
Content-Type: application/samlmetadata+xml
D/ling with compression:
allstar:~ rhys$ curl -H "Accept-Encoding: gzip" -I
http://metadata-test.ukfederation.org.uk/ukfederation-metadata.xml
HTTP/1.1 200 OK
Date: Wed, 19 Oct 2016 05:14:06 GMT
Server: Apache/2.4.6 (Red Hat Enterprise Linux)
Last-Modified: Tue, 18 Oct 2016 16:07:44 GMT
ETag: "5c0336-53f25e487d400"
Accept-Ranges: bytes
Content-Length: 6030134
Content-Type: application/samlmetadata+xml
Content-Encoding: gzip
(So that’s 27MB down to 6MB).
Rhys.
--
Dr Rhys Smith
Chief Technical Architect, Trust & Identity
Jisc
T: +44 (0) 1235 822145
M: +44 (0) 7968 087821
Skype: rhys-smith
GPG: 0x4638C985
Lumen House, Library Avenue, Harwell Oxford, Didcot, OX11 0SG
jisc.ac.uk
Jisc is a registered charity (number 1149740) and a company limited by
guarantee which is registered in England under Company No. 5747339, VAT No.
GB 197 0632 86. Jisc’s registered office is: One Castlepark, Tower Hill,
Bristol, BS2 0JA. T 0203 697 5800.
> On 19 Oct 2016, at 00:00, Brent Putman
> <>
> wrote:
>
>
>
> On 10/18/16 6:39 PM, Cantor, Scott wrote:
>>> I don't know what metadata clients support HTTP Compression. I assume
>>> Shibboleth does but I don't know that for a fact.
>>>
>> I assume the IdP supports it uniformly, but I don't know.
>
> Yes, the HttpClient instances used in the Shibboleth IdP's metadata
> resolvers do support compression by default, for the "gzip" and "deflate"
> schemes. I don't believe there's anything further to be done.
>
>>> Assuming Shibboleth handles HTTP Compression just fine, I wouldn't
>>> expect too many problems if we enabled apache but a few deployments
>>> will experience problems, I'm sure. The fallback aggregate would come
>>> in handy here. Does anyone know how to configure apache such that the
>>> fallback aggregate is NOT compressed on the fly (yet everything else
>>> is)?
>>>
>
> mod_deflate has many options. [1] (Despite its name, it's really now about
> gzip compression). You can scope whether it compresses or not, by applying
> directives to a Location or Directory block, etc, just like any other httpd
> directives.
>
>> Isn't compression just negotiated? You make the resources available in
>> that form and Apache will serve up whatever the client handles. Shouldn't
>> be any breakage with it.
>>
>
> That is my understanding also. Client sends for example HTTP request
> header: "Accept-Encoding: gzip,deflate". Server responds with for example
> HTTP response header: "Content-Encoding: gzip". Each does the right thing
> depending on what it got from the other.
>
>
> [1] http://httpd.apache.org/docs/current/mod/mod_deflate.html
>
- [Per-Entity] HTTP Compression, Tom Scavo, 10/18/2016
- Re: [Per-Entity] HTTP Compression, Patrick Radtke, 10/18/2016
- Re: [Per-Entity] HTTP Compression, Tom Scavo, 10/21/2016
- RE: [Per-Entity] HTTP Compression, Cantor, Scott, 10/18/2016
- Re: [Per-Entity] HTTP Compression, Brent Putman, 10/18/2016
- Re: [Per-Entity] HTTP Compression, Rhys Smith, 10/19/2016
- Re: [Per-Entity] HTTP Compression, Brent Putman, 10/18/2016
- Re: [Per-Entity] HTTP Compression, Patrick Radtke, 10/18/2016
Archive powered by MHonArc 2.6.19.