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

Share:
5,633

Related videos on Youtube

Jason
Author by

Jason

Updated on September 18, 2022

Comments

  • Jason
    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
    Jason almost 6 years
    Does that work both ways? Uploads and downloads?
  • John Hanley
    John Hanley almost 6 years
    If 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
    Jason almost 6 years
    I need it to unzip gzipped data as the server code will not support gzip post requests. Trying to reduce client upload data.
  • John Hanley
    John Hanley almost 6 years
    Few 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.