Table of Contents

mod_limits

This module adds rate-limiting for XMPP sessions, limiting excessive bandwidth usage by clients and remote servers.

This module has been included with Prosody since 0.10. For earlier versions, please see the community-maintained module.

Usage

    modules_enabled = {
        -- Other modules
        "limits"; -- Enable rate-limiting module
    }

Extra configuration required to enable the limits is described below.

Configuration

Option Default Notes
limits {} Sets the limits for each session type
limits_resolution 1 Sets the time that an over-limit session is suspended for

Currently mod\_limits is configured per connection type. The possible connection types are:

  • c2s
  • s2sin
  • s2sout
  • component

The limits are specified like so in the global section of your config (they cannot be per-host):

limits = {
  c2s = {
    rate = "3kb/s";
    burst = "2s";
  };
  s2sin = {
    rate = "10kb/s";
    burst = "5s";
  };
}

All units are in terms of *bytes*, not *bits*, so that "kb/s" is interpreted as "kilobytes per second", where a kilobyte is 1000 bytes.

 
doc/modules/mod_limits.txt · Last modified: 2017/10/11 14:16 by Matthew Wild