Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Neilj/mau tracking config explainer #5284

Merged
merged 13 commits into from Jun 5, 2019
1 change: 1 addition & 0 deletions changelog.d/5284.misc
@@ -0,0 +1 @@
Improve sample config for monthly active user blocking.
18 changes: 17 additions & 1 deletion docs/sample_config.yaml
Expand Up @@ -261,10 +261,26 @@ listeners:

# Monthly Active User Blocking
#
# Used in cases where the admin or server owner wants to limit to the
neilisfragile marked this conversation as resolved.
Show resolved Hide resolved
# number of monthly active users.
#
# 'limit_usage_by_mau' disables/enables monthly active user blocking. When
# anabled and a limit is reached the server returns a 'ResourceLimitError'
neilisfragile marked this conversation as resolved.
Show resolved Hide resolved
# with error type Codes.RESOURCE_LIMIT_EXCEEDED
neilisfragile marked this conversation as resolved.
Show resolved Hide resolved
#
# 'max_mau_value' is the hard limit of monthly active users above which
# the server will start blocking user actions.
#
# 'mau_trial_days' is a means to add a grace period for active users. It
neilisfragile marked this conversation as resolved.
Show resolved Hide resolved
# means that users must be active for this number of days before they
# can be considered active and guards against the case where lots of users
# sign up in a short space of time never to return after their initial
# session.
#
#limit_usage_by_mau: False
#max_mau_value: 50
#mau_trial_days: 2

#
# If enabled, the metrics for the number of monthly active users will
# be populated, however no one will be limited. If limit_usage_by_mau
# is true, this is implied to be true.
Expand Down
18 changes: 17 additions & 1 deletion synapse/config/server.py
Expand Up @@ -585,10 +585,26 @@ def default_config(self, server_name, data_dir_path, **kwargs):

# Monthly Active User Blocking
#
# Used in cases where the admin or server owner wants to limit to the
neilisfragile marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above

# number of monthly active users.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you document what happens when the limit is hit?

#
# 'limit_usage_by_mau' disables/enables monthly active user blocking. When
# anabled and a limit is reached the server returns a 'ResourceLimitError'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above

# with error type Codes.RESOURCE_LIMIT_EXCEEDED
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above

#
# 'max_mau_value' is the hard limit of monthly active users above which
# the server will start blocking user actions.
#
# 'mau_trial_days' is a means to add a grace period for active users. It
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above

# means that users must be active for this number of days before they
# can be considered active and guards against the case where lots of users
# sign up in a short space of time never to return after their initial
# session.
#
#limit_usage_by_mau: False
#max_mau_value: 50
#mau_trial_days: 2

#
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this

# If enabled, the metrics for the number of monthly active users will
# be populated, however no one will be limited. If limit_usage_by_mau
# is true, this is implied to be true.
Expand Down