Class RateLimitOptions
How fast clients may write and log in, configuration section Section; requests beyond the limits get M_LIMIT_EXCEEDED with the time to wait, which clients retry after.
Implements
Inherited Members
Namespace: Uniform.Matrix.Server.Configuration
Assembly: Uniform.Matrix.Server.dll
Syntax
public sealed record RateLimitOptions : IEquatable<RateLimitOptions>
Remarks
Each limit is a token bucket: a burst at once, then a steady rate. Writes are counted per access token, logins and registrations per client address.
Fields
| Edit this page View SourceSection
Configuration section name.
Declaration
public const string Section = "RateLimits"
Field Value
| Type | Description |
|---|---|
| string |
Properties
| Edit this page View SourceEnabled
Whether the limits apply.
Declaration
public bool Enabled { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
LoginBurst
Logins and registrations from one address allowed at once.
Declaration
public int LoginBurst { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
LoginsPerMinute
Logins and registrations from one address allowed per minute after the burst.
Declaration
public int LoginsPerMinute { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
WriteBurst
Writes, such as messages, state changes, invites, new rooms and uploads, allowed at once.
Declaration
public int WriteBurst { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
WritesPerSecond
Writes allowed per second after the burst.
Declaration
public int WritesPerSecond { get; set; }
Property Value
| Type | Description |
|---|---|
| int |