Reference

set rate-limit http-compression global

Set the process-wide compression rate limit.

Description Jump to heading

If compression is enabled with the filter compression directive, the load balancer compresses responses before relaying them to the client. You can set the global directive maxcomprate to limit the number of kilobytes per second that get compressed, reducing CPU usage.

haproxy
global
maxcomprate 250
haproxy
global
maxcomprate 250

By default, it’s set to 0, which means unlimited.

Use set rate-limit http-compression global to change this setting dynamically.

Examples Jump to heading

Below, we set the maxcomprate directive to 500 dynamically:

nix
echo "set rate-limit http-compression global 500" | \
sudo socat stdio tcp4-connect:127.0.0.1:9999
nix
echo "set rate-limit http-compression global 500" | \
sudo socat stdio tcp4-connect:127.0.0.1:9999

See also Jump to heading

Do you have any suggestions on how we can improve the content of this page?