Mercurial > prosody-wiki
comparison mod_muc_limits.wiki @ 257:53e6f43b23fc
Created wiki page through web user interface.
author | MWild1@gmail.com |
---|---|
date | Sun, 15 Jan 2012 01:35:10 +0000 |
parents | |
children | 440f4d3ee523 |
comparison
equal
deleted
inserted
replaced
256:c44f0864b33c | 257:53e6f43b23fc |
---|---|
1 #summary Impose rate-limits on a MUC | |
2 #labels Stage-Beta | |
3 | |
4 = Introduction = | |
5 | |
6 This module allows you to control the maximum rate of 'events' in a MUC room. This makes it useful to prevent room floods (whether malicious or accidental). | |
7 | |
8 = Details = | |
9 | |
10 This module limits the following events: | |
11 | |
12 * Room joins | |
13 * Nick changes | |
14 * Status changes | |
15 * Messages | |
16 | |
17 The limit is for the room as a whole, not individual occupants in the room. Users with an affiliation (members, admins and owners) are not limited. | |
18 | |
19 = Configuration = | |
20 | |
21 || *Name* || *Default value* || *Description* || | |
22 || muc_event_rate || 0.5 || The maximum number of events per second. || | |
23 || muc_burst_factor || 6 || Allow temporary bursts of this multiple. || | |
24 | |
25 For more understanding of how these values are used, see the algorithm section below. | |
26 | |
27 = Algorithm = | |
28 | |
29 A certain number of events are allowed per second, given by muc_event_rate. An event rate of 1 allows one event per second, and event rate of 3 allows three events per second, and 0.5 allows one event every two seconds, and so on. | |
30 | |
31 Obviously MUC conversations are not exactly steady streams of events. Sometimes multiple people will talk at once. This is handled by the muc_burst_factor option. | |
32 | |
33 A burst factor of 2 will allow 2 times as many events at once, for 2 seconds, before throttling will be triggered. A factor of 5, 5 times as many events for 5 seconds. | |
34 | |
35 When the limit is reached, an error response will be generated telling the user the MUC is overactive, and asking them to try again. | |
36 | |
37 = Compatibility = | |
38 || Trunk || Works || | |
39 || 0.8 || Doesn't work`*` || | |
40 | |
41 `*` This module can be made to work in 0.8 (and _maybe_ previous versions) of Prosody by copying the new [http://hg.prosody.im/trunk/raw-file/fc8a22936b3c/util/throttle.lua util.throttle] into your Prosody source directory (into the util/ subdirectory). |