shaper section specifies traffic shapers used to limit the incoming XMPP traffic, providing a safety valve to protect the server. It can be used to prevent DoS attacks or to calm down too noisy clients.
- Scope: global
- Syntax: each shaper is specified in a subsection starting with
nameis used to uniquely identify the shaper.
- Default: no default - each shaper needs to be specified explicitly.
- Example: the
normalshaper is used for the C2S connections.
Traffic shaper options
- Syntax: positive integer
- Default: no default, this option is mandatory
maxrate = 1000
Defines the maximum accepted rate. For the shapers used by XMPP listeners this is the number of bytes per second, but there are shapers that use different units, e.g. MAM shapers.
The following examples show the typical shaper definitions.
This is the typical definition of an XMPP shaper, which accepts the maximum data rate of 1 kbps. When the rate is exceeded, the receiver pauses before processing the next packet.
For S2S connections we need to increase the limit as they receive the accumulated traffic from multiple users - e.g. to 50 kbps:
These shapers limit the number of MAM operations per second (rather than bytes per second).
1 2 3 4 5
To make use of them, the corresponding rules should be defined in the