Skip to content

Commit 37d489e

Browse files
committed
matrix config
1 parent 19881bd commit 37d489e

File tree

1 file changed

+70
-25
lines changed

1 file changed

+70
-25
lines changed

kubernetes/applications/matrix/configmap.yaml

Lines changed: 70 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ data:
1111
server_name: "matrix.ildoc.it"
1212
public_baseurl: "https://matrix.ildoc.it"
1313
14+
presence:
15+
enabled: false
16+
1417
listeners:
1518
- port: 8008
1619
tls: false
@@ -32,6 +35,9 @@ data:
3235
port: 5432
3336
cp_min: 5
3437
cp_max: 10
38+
keepalives_idle: 10
39+
keepalives_interval: 10
40+
keepalives_count: 3
3541
3642
# Redis
3743
redis:
@@ -97,25 +103,34 @@ data:
97103
allow_public_rooms_without_auth: false
98104
allow_public_rooms_over_federation: false
99105
100-
# Rate limiting
106+
# === RATE LIMITING (RELAXED) ===
101107
rc_message:
102-
per_second: 0.2
103-
burst_count: 10
104-
105-
rc_registration:
106-
per_second: 0.17
107-
burst_count: 3
108-
108+
per_second: 100
109+
burst_count: 100
110+
109111
rc_login:
110112
address:
111-
per_second: 0.17
112-
burst_count: 3
113+
per_second: 10
114+
burst_count: 10
113115
account:
114-
per_second: 0.17
115-
burst_count: 3
116-
failed_attempts:
117-
per_second: 0.17
118-
burst_count: 3
116+
per_second: 10
117+
burst_count: 10
118+
119+
rc_joins:
120+
local:
121+
per_second: 1
122+
burst_count: 10
123+
remote:
124+
per_second: 1
125+
burst_count: 10
126+
127+
rc_invites:
128+
per_room:
129+
per_second: 10
130+
burst_count: 100
131+
per_user:
132+
per_second: 10
133+
burst_count: 100
119134
120135
# Chiavi e federation
121136
signing_key_path: "/data/keys/signing.key"
@@ -127,20 +142,50 @@ data:
127142
enable_metrics: true
128143
metrics_port: 9000
129144
130-
# Retention policy
145+
# === ROOM SYNC OPTIMIZATION ===
146+
filter_timeline_limit: 50
147+
148+
limit_remote_rooms:
149+
enabled: true
150+
complexity: 3.0
151+
admins_can_join: true
152+
131153
retention:
132154
enabled: true
133155
default_policy:
134-
min_lifetime: 1d
135-
max_lifetime: 365d
136-
allow_lifetime_updates: true
137-
policies:
138-
- min_lifetime: 7d
139-
max_lifetime: 365d
156+
max_lifetime: 90d
157+
allowed_lifetime_max: 90d
140158
purge_jobs:
141-
- interval: 24h
142-
threshold: 365d
143-
159+
- interval: 1d
160+
161+
# === MEMORY OPTIMIZATION ===
162+
event_cache_size: 20K
163+
164+
caches:
165+
global_factor: 1.0
166+
expire_caches: true
167+
cache_entry_ttl: 30m
168+
sync_response_cache_duration: 2m
169+
170+
per_cache_factors:
171+
stateGroupCache: 0.5
172+
stateGroupMembersCache: 0.5
173+
get_rooms_for_user: 2.0
174+
get_user_by_access_token: 2.0
175+
176+
gc_thresholds: [550, 10, 10]
177+
gc_min_interval: [1s, 1m, 2m]
178+
179+
# === FEATURE OPTIMIZATION ===
180+
# url_preview_enabled: false
181+
enable_metrics: false
182+
max_upload_size: 50M
183+
max_image_pixels: 32M
184+
185+
media_retention:
186+
local_media_lifetime: 90d
187+
remote_media_lifetime: 30d
188+
144189
# Federation
145190
federation:
146191
backfill_on_join: false

0 commit comments

Comments
 (0)