Terminate Gzip compression at AWS ELB classic load balancer
5,633
No, AWS load balancers do not support compressing or decompressing data streams.
However, CloudFront does. Adding CloudFront in front of your load balancer improves performance and security.
Here is a link regarding CloudFront and Gzip:
Gzip Compression Support for Amazon CloudFront
Related videos on Youtube
Author by
Jason
Updated on September 18, 2022Comments
-
Jason over 1 year
We have a set of servers in AWS that are behind an ELB. We are trying to upload data to the server. We want to enable gzip, but the servers themselves use an obscure golang framework that does not have default gzip support to uncompress incoming requests.
Is it possible to terminate gzip at a load balancer, and send uncompressed content to the servers behind them?
That way our clients can send gzipped data, and we don't have to modify the server code.
-
Jason almost 6 yearsDoes that work both ways? Uploads and downloads?
-
John Hanley almost 6 yearsIf the client (web browser) sends data gzip compressed, CloudFront would pass the data to your backend gzip compressed. CloudFront will not gzip compress the client data before sending to your backend.
-
Jason almost 6 yearsI need it to unzip gzipped data as the server code will not support gzip post requests. Trying to reduce client upload data.
-
John Hanley almost 6 yearsFew clients are going to gzip POST/PUT requests. If they do, the header Content-Encoding will be set. The load balancer will pass the data and this header unchanged back to your server. One of the reasons that the load balancer will NOT decompress your data is due to security issues like "Zip Bomb" where a small compressed request becomes a huge data stream decompressed.