Commit a2646fad authored by Jérome Perrin's avatar Jérome Perrin

apache frontend: describe prefer-gzip-encoding-to-backend

parent 4a9390e8
......@@ -117,7 +117,7 @@
"prefer-gzip-encoding-to-backend": {
"title": "Prefer gzip Encoding for Backend",
"description": "If set to true, if a request is made with accept encoding 'gzip', only that one will be transferred to the backend",
"description": "If set to true, frontend will force an Accept-Encoding: gzip header to enable compression between frontend and backend even when client did not request compression",
"type": "string",
"default": "false",
"enum": ["false", "true"]
......
  • even when client did not request compression -> No.

    When a client do a request, you pass the Accept-Encoding header. For me it is:

    Accept-Encoding:gzip, deflate, sdch, br

    But in a lot of case the cache configuration has Vary:Accept-Encoding . Accept-Encoding request header may vary a lot from a client to another but one of the common denominator is gzip. So in order to avoid a multiplication of cache versions in CDN, if gzip is present in the Accept-Encoding request header all other format are stripped from the request in order to reduce variation in Trafficserver.

    When this parameter is activated:

    Accept-Encoding:gzip, deflate, sdch, br

    is transmitted as

    Accept-Encoding:gzip

    And

    Accept-Encoding:deflate, sdch, br

    is transmitted as

    Accept-Encoding:deflate, sdch, br

    I'm not sure how to sum this up in the description. Maybe:

    If set to true, frontend will strip all format expect from gzip from the Accept-Encoding request header if gzip is present in it. This functionality is used with the enable_cache parameter in order to reduce cache variation in CDN when Accept-Encoding is present in the Vary Response header

    Please let me know if this is clear enough to be used as description.

  • Ahaha yes, my understanding was completly wrong. Thanks for that good explanation, that makes much more sense.

    How about:

    If set to true, frontend will rewrite Accept-Encoding request header to simply "gzip" for all variants of Accept-Encoding containing "gzip", in order to maximize cache hits for resources cached with Vary: Accept-Encoding when enable_cache is used

    Hopefully people looking for more explanation will find your explanation on gitlab.

  • Excellent. It is very clear thanks.

Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment