Compression for synthetic content from vcl_error
Hi,
is it possible to gzip content generated by synthetic command in vcl_error?
I found some 5+ years old discussions and it appears only cacheable content from origin can be compressed (configurable in vcl_fetch). So a solution might be to chain multiple requests. One to generate response and other to cache, compress and return to the client.
This seems unnecessarily complex for simple gziping, is there any simpler way nowdays?
-
Hi Jindrich,
Sorry for the delay in response. Let me make a ticket so we can assist you further!
Be on the lookout for a support@fastly.com email :)
Cheers,
Dara
-
Hello Jindřich,
We don't currently have any convenient ways to compress un-cacheable responses, although we are actively working on a feature that will allow you to do so in the future.
As for compressing synthetic responses with service chaining, this would likely work as long as the responses were static and made cacheable either through setting a
cache-control
header on the origin-fetch service, or by setting an explicit TTL on the chained client delivery service. Please be aware, however, that you would be subject to extra billing for each hop that a request makes to reach a client (more on billing can be found here: https://docs.fastly.com/en/guides/how-we-calculate-your-bill).
Please sign in to leave a comment.
Comments
2 comments