summary refs log tree commit diff
path: root/host/Rory-nginx/services/matrix/synapse/ratelimits.nix
blob: ffce1cc9ba3be72fd784efd90a9a141afb37bad6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{
  # messages
  rc_message = {
    per_second = 1000000;
    burst_count = 1000000;
  };
  rc_admin_redaction = {
    per_second = 10000000;
    burst_count = 10000000;
  };

  # room joins
  rc_joins = {
    local = {
      per_second = 1000;
      burst_count = 1000;
    };
    remote = {
      per_second = 1000;
      burst_count = 1000;
    };
  };
  rc_joins_per_room = {
    per_second = 1000;
    burst_count = 1000;
  };

  # room invites
  rc_invites = {
    per_room = {
      per_second = 1000;
      burst_count = 1000;
    };
    per_user = {
      per_second = 1000;
      burst_count = 1000;
    };
    per_issuer = {
      per_second = 1000;
      burst_count = 1000;
    };
  };
  rc_third_party_invite = {
    per_second = 1000;
    burst_count = 1000;
  };

  # federation
  rc_federation = {
    window_size = 10;
    sleep_limit = 1000;
    sleep_delay = 100;
    reject_limit = 1000;
    concurrent = 100;
  };
  federation_rr_transactions_per_room_per_second = 1;

  # media
  rc_media_create = {
    per_second = 1000;
    burst_count = 1000;
  };
  remote_media_download_burst_count = "512G";
  remote_media_download_per_second = "512G";

  # authentication
  rc_login = {
    address = {
      per_second = 1000;
      burst_count = 1000;
    };
    account = {
      per_second = 1000;
      burst_count = 1000;
    };
    failed_attempts = {
      per_second = 0.1;
      burst_count = 3;
    };
  };
  rc_3pid_validation = {
    per_second = 1000;
    burst_count = 1000;
  };
}