Configuring Data Compression for an HTTP or HTTPS Listener
You can enable data compression for HTTP and HTTPS listeners to reduce the data size to be transferred, speed up transfers, and lower bandwidth usage.
Data Compression Overview
When sending an HTTP or HTTPS request, the client includes Accept-Encoding:gzip,deflate,br,* in the request header, indicating that the client supports data compression and writes the compression algorithms it supports into the request header. Upon receiving the request, the server checks the Accept-Encoding header to determine which compression algorithms the client supports. Based on its own configuration and capabilities, the server selects one of the supported compression algorithms to compress the response body and includes Content-Encoding in the response header to notify the client that the response has been encrypted and the encryption algorithm used.
Compression is handled at every point in the communication chain (client, load balancer, and backend servers). For example, if a backend server compresses a response, ELB sends the response directly to the client without compressing the response again. ELB can only compress the response body whose status code is 200, 403, and 404.


Constraints
Brotli and Gzip can compress the files in the following format: text/html, tex/xml, text/plain text/css, application/javascript, application/x-javascript, application/rss+xml, application/atom+xml, application/xml, and application/json.
Enabling Data Compression for an HTTP or HTTPS Listener
You can enable data compression when adding an HTTP or HTTPS listener or enable it later.
- Go to the load balancer list page.
- Add an HTTP or HTTPS listener in either of the following ways:
- On the displayed page, locate the load balancer and click its name. On the Listeners tab, click Add Listener.
- On the displayed page, locate the load balancer and click Add Listener in the Operation column.
- On the Add Listener page, expand Advanced Settings (Optional) and enable data compression as needed.
Figure 3 Enabling data compression
- Configure other parameters of the listener as prompted.
- Confirm the configurations and click Submit.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot