Skip to content

Concepts docs: Gateway architecture — rooms, resume, rate limiting #448

Description

@codebestia

Write apps/backend/docs/concepts-gateway-architecture.md explaining the WebSocket gateway's structural pieces: services/roomManager.ts (conversation + user rooms), services/resumeStream.ts (Redis Streams-backed missed-event replay), services/rateLimit.ts (per-socket rate limiting/payload caps), services/backpressure.ts (slow-consumer handling), and the Redis pub/sub cross-node fan-out.

Acceptance criteria:

  • Room types and their purpose are explained, including why membership is re-validated against Postgres rather than trusted from room state alone
  • The resume/replay mechanism is explained with its bounding/TTL behavior
  • Rate limiting, payload caps, and backpressure/shedding thresholds are documented with their current configurable values and env var names

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackenddocumentationImprovements or additions to documentation

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions