-
Notifications
You must be signed in to change notification settings - Fork 8
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
Consider adding compression #155
Comments
Cool idea
I don't understand why we care about the CDN if we will compress at the server side |
I think it needs to support the compression to understand that the response is compressed. For example, if someone asks for non-compressed version. I don't think this is an issue (compression is standard for a long time) but It would be nice to double check. |
Alternatively implement an alternative endpoint that serves the compressed version |
What I mention here is not entirely accurate. When CDN gets a requests it computes "cache key" for it and looks whether it has something stored for this key. If yes, it sends the response. There are different ways how to create the cache key (often configurable), but AWS only looks at domain name and URL path. However, we can configure caching strictly on the CloudFront layer, without the origin support. Another point to optimize would be pushing data from Airnode feed to Signed APIs. The problem is that both services are CPU bound and the compression optimizes bandwith, but for the cost of CPU (due to compression/decompression). So I am not keen on the idea. I think it having CDN compression is kinda nice, especially since there is no code change. Still this doesn't feel worth the effort. |
See: https://github.com/expressjs/compression/tree/88ba108ccebd131f336b7a0fa310f50bcc982992
Our responses are quite large and are well compressible. This could speed up the request-response time. Note that Signed API will be behind CDN so compression should only work if it's supported by the CDN.
The text was updated successfully, but these errors were encountered: