Repository navigation
Gateway limits
rebaserHEAD edited this page Oct 18, 2026
·
1 revision
The limits the gateway holds at its ports, and what it logs. Each limit's setting is on Gateway, and a message's own rate limit is on Gateway gate.
| Limit | Holds |
|---|---|
| Connections per address | Each listener's handler takes a slot from the per-address limit, refuses a connection past it, and hands the rest to their connection class |
| Frame size | A frame longer than MaxClientFrameBytes, or shorter than its own header, ends the connection, judged before the body arrives |
| Time to log in | Every connection has PreAuthTimeout to complete a login. After a grant there's no idle limit yet |
| Login attempts | Limited per address per minute, IPv4 and its IPv6-mapped form counted as one. A refused attempt doesn't extend the wait |
| The outbound queue | A session's queue is bounded, and a full one ends the connection |
| Disconnecting | What's already queued is sent, then the connection gets DisconnectGrace before it's closed by force, so a client that stops reading can't hold it open |
- No secret is ever logged: not a password, salt, verifier, game token, session key, RC4 key or account name.
-
At debug level the gateway logs the message flow: each game message decoded, dropped, malformed or sent, by connection, opcode and type name, never its values, and each refused sign-on request by its method and address, in printable characters and cut at 80. It's off unless
Logging:LogLevel:NexusTomorrow.GatewayisDebug, and costs nothing while off.
- A logged-in connection has no idle limit yet.
- There's no overall message rate per session yet, only each opcode's own (Gateway design).
| Piece | Path |
|---|---|
| The connection limit and the login rate limiter | Source/NexusTomorrow.Gateway/Limits/ |
| The listeners | Source/NexusTomorrow.Gateway/Kestrel/ |
| The outbound queue and disconnecting | Source/NexusTomorrow.Gateway/Connections/ |
| The gateway's log messages | Source/NexusTomorrow.Gateway/GatewayLog.cs |
| Tests | Tests/NexusTomorrow.Gateway.Tests/ |
Start here
How the server works
- Server core design
- Host
- Gateway
- Owners
- Persistence
- Command layer
- Harness
- Map scheduler design
- Timer wheel design
The protocol
Working on it