HAProxy Enterprise Documentation 2.5r1

set rate-limit sessions global

Set the process-wide session rate limit.

Description

By setting the global setting maxsessrate, you can limit the rate at which the load balancer creates sessions between clients and backend servers. When it reaches the limit, it stops accepting new connections. In the snippet below, 1,000 sessions per second are allowed:

global
   maxsessrate 1000

Note that this limit is process-wide, so it is possible for one frontend to consume the majority of the capacity. However, you can also set a per-frontend limit with either the rate-limit sessions directive or with a stick table.

Use the set rate-limit sessions global command to change the global maxsessrate setting dynamically.

Examples

Below, we set the global session rate limit to 5,000 sessions per second:

$ echo "set rate-limit sessions global 5000" | \
   sudo socat stdio unix-connect:/var/run/hapee-2.5/hapee-lb.sock

See also


Next up

set rate-limit ssl-sessions global