Skip to content

Commit 8bdb72c

Browse files
authored
Give an estimate for room complexity values. (#19384)
1 parent f54fd64 commit 8bdb72c

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

changelog.d/19384.doc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Clarify how the estimated value of room complexity is calculated internally.

docs/usage/configuration/config_documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ server_context: context
956956
---
957957
### `limit_remote_rooms`
958958

959-
*(object)* When this option is enabled, the room "complexity" will be checked before a user joins a new remote room. If it is above the complexity limit, the server will disallow joining, or will instantly leave. This is useful for homeservers that are resource-constrained. Room complexity is an arbitrary measure based on factors such as the number of users in the room.
959+
*(object)* When this option is enabled, the room "complexity" will be checked before a user joins a new remote room. If it is above the complexity limit, the server will disallow joining, or will instantly leave. This is useful for homeservers that are resource-constrained. In Synapse, the complexity of a room is measured by the number of current state events in a room, divided by 500. "Current" here means the latest state, i.e. if a user joins, then leaves, then joins, that will count as 1 current `m.room.member` state event.
960960

961961
This setting has the following sub-options:
962962

schema/synapse-config.schema.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,8 +1113,11 @@ properties:
11131113
When this option is enabled, the room "complexity" will be checked before
11141114
a user joins a new remote room. If it is above the complexity limit, the
11151115
server will disallow joining, or will instantly leave. This is useful for
1116-
homeservers that are resource-constrained. Room complexity is an arbitrary
1117-
measure based on factors such as the number of users in the room.
1116+
homeservers that are resource-constrained. In Synapse, the complexity of a
1117+
room is measured by the number of current state events in a room, divided
1118+
by 500. "Current" here means the latest state, i.e. if a user joins, then
1119+
leaves, then joins, that will count as 1 current `m.room.member` state
1120+
event.
11181121
properties:
11191122
enabled:
11201123
type: boolean

0 commit comments

Comments
 (0)