WebSocket Stream Manager — Constitution¶
Hard-Stop Rules¶
These rules must never be violated. Violations require immediate halt and review.
- Never allow unbounded connection pool growth
- Never skip heartbeat failure detection in production
- Never close connections without proper WebSocket close handshake
Mandatory Rules¶
These rules must be followed in all circumstances.
- Idle connection reaping after configurable timeout
- Backpressure activation before memory limits
- Connection handshake within 5-second timeout
- Heartbeat failure triggers reconnection within 3 intervals
Preferred Practices¶
Best practices that should be followed when possible.
- Use binary frames for high-throughput event streaming
- Include connection quality metrics in health endpoints
- Provide graceful degradation under connection pressure