mattermost/server/public
Agniva De Sarker da7192246e
MM-62960: Improve webConn remove performance from hubConnectionIndex (#30178)
When we added iteration by channelID, this was a known tradeoff during that.
However, it has been observed that the regular connection removal function
creates considerable blocking of the processing loop, leading to high
CPU usage and API latencies.

To fix this, we add a reverse mapping of channelIDs to connections
and their positions in the slice. This helps us to remove the connection
from the slice without iteration.

Unfortunately, this still needs to iterate through all channelIDs
during invalidation of the channel member cache. However, the user
cache invalidation is not a regular activity. So it should be an acceptable
tradeoff to make.

https://mattermost.atlassian.net/browse/MM-62960

```release-note
A new config knob ServiceSettings.EnableWebHubChannelIteration which allows a user to control the performance of websocket broadcasting. By default, this setting is turned off. If it is turned on, it improves the websocket broadcasting performance at the expense of poor performance when users join/leave a channel. It is not recommended to turn it on unless you have atleast 200,000 concurrent users actively using MM.
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-02-14 09:19:36 +05:30
..
model MM-62960: Improve webConn remove performance from hubConnectionIndex (#30178) 2025-02-14 09:19:36 +05:30
plugin MM-49353: Setup intermediate signal handlers for plugin shutdown (#28653) 2025-01-21 11:15:19 +05:30
pluginapi [MM-54288] Support Packet V2 (#29403) 2025-01-13 20:23:09 +01:00
shared MM-59966 - Compliance Export overhaul - feature branch (#29789) 2025-01-10 16:56:02 -05:00
utils [MM-62762] Make config location in Support Packet human-readable (#30027) 2025-02-11 10:06:27 +01:00
go.mod MM-60211: Bump dependencies (#30005) 2025-02-06 21:48:08 +05:30
go.sum MM-60211: Bump dependencies (#30005) 2025-02-06 21:48:08 +05:30
LICENSE.txt add Apache 2.0 license to public submodule (#23945) 2023-07-07 10:56:42 -03:00
Makefile [MM-53968] Includes mattermost-plugin-api into the mono repo (#24235) 2023-08-21 09:50:30 +02:00