Mattermost 7.0 WebSocket dispatcher pool sizing and latency under high concurrency
0 reputation · 24 Jul 2023, 08:12 UTC
Background
Mattermost 7.0 introduced a revised WebSocket message dispatcher that runs inbound traffic on a dedicated goroutine pool. The default server configuration caps simultaneous WebSocket connections at 500, and exceeding this limit causes connection queuing and measurable message delivery delays.
No documented tuning parameters exist for the dispatcher’s goroutine pool size or back‑pressure thresholds, leaving administrators without guidance to mitigate latency spikes. Observed latency variations also correlate with PostgreSQL query load, but the exact interaction between concurrent WebSocket traffic and the database connection pool remains ambiguous.
Open questions
- What is the recommended goroutine pool size for the WebSocket dispatcher when serving more than 500 concurrent connections?
- How does the dispatcher interact with the PostgreSQL connection pool under sustained load?
- Are there any undocumented configuration flags that control back‑pressure thresholds for the dispatcher?