mod_csi_simple Client State Indication
This module enables simple traffic optimisation for clients that have reported themselves as inactive to mod_csi, following the recommendations in XEP-0286: Mobile Considerations on LTE Networks
This module automatically loads mod_csi, so
only "csi_simple"
need be added to modules_enabled
.
How it works
The module works by buffering unimportant traffic to inactive devices, such as contact status changes. The data is released when any important data comes in (such as a message from a contact), or when the queue size is reached.
Stanzas currently classified as important are:
presence
stanzas other than status changes, i.e. subscription requests.message
stanza that…- are outgoing carbon-copied messages sent by the user.
- includes a textual message.
- changes the subject / topic in group chats.
- are explicitly marked as end-to-end encrypted.
- contains any payload included in the
csi_important_payloads
setting
- Any
iq
stanzas.
The decision can be further influenced by other modules.
Configuration
These are all advanced options that normally should not need tweaking, but exist to allow fine-tuning. Suggestions for improved defaults are welcome, especially if based on science.
option | type | default |
---|---|---|
csi_important_payloads |
set | empty |
csi_queue_size |
number | 256 |
csi_resume_inactive_delay |
number | 5 |
csi_important_payloads
(added in 0.12) allows specifying
additional message payloads to consider as indicators of an important
stanza. This lets you teach Prosody about new or custom protocols.
= {
csi_important_payloads -- Anything in this namespace:
"{urn:example:important-namespace}",
-- Specific element name and namespace:
"{urn:example:xmpp:priority}super-important",
}
csi_queue_size
controls how many stanzas are buffered
before sending them all at once. Higher values lets clients conserve
bandwidth and power for longer periods, at the cost of memory usage for
the server and the risk that the clients connection times out.
csi_resume_inactive_delay
(added in 0.12) is the delay,
in seconds, after which inactive mode is resumed after a flush has been
triggered. This takes advantage of the mobile radio already being in the
high-power state for a period after having received a batch of
stanzas.
History
This module was first added in 0.11.x. It came from the community
module mod_csi_pump
.
Starting with 0.12.0 it will also flush the queue when incoming traffic from clients is received, since its radio would be active already.