-
Notifications
You must be signed in to change notification settings - Fork 538
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
Disabling gzip compression in cloudfront's cache option. #373
Disabling gzip compression in cloudfront's cache option. #373
Conversation
@fvsnippets thank you for your contribution. We will look into it and add it to our backlog. |
Hey @fisenkodv, do you have an idea when we should expect a new release? Would love to have this merged. |
Hi @karensg |
This pr has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
Keeping it open. |
This pr has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
…prove cloudfront's cache hit ratio.
f1c048b
to
1abf830
Compare
Updated with current main branch (using rebase). Conflicts were resolved. |
@fvsnippets Thanks for your suggestion and submission. We have been discussing it and are planning on including the change in an upcoming release. |
addressed with v6.2.4 |
There's no need to enable gzip in the cloudfront's cache policy.
Current cache policy, enables gzip compression which in turn adds the "accept-encoding" header to the cache key. But origin (resizing lambda) won't use it (am I missing something?) which makes sense because we are working with already compressed image-formats.
Notice that cloudfront enables auto compression only on image/svg+xml (see this) which also makes sense.
So, with current cache policy, two almost "equivalent" requests (from cloudfront's cache key perspective), except for the accept-encoding: gzip header presence, will generate different entries on the cache.
Please read this: "Remove Accept-Encoding header when compression is not needed".
I am disabling gzip compression on cloudfront's cache policy. This change will improve the cloudfront's cache hit ratio.
Issue #, if available:
#304
Description of changes:
Switching off gzip compression on cloudfront's cache policy.
Tests were updated to reflect changes.
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.