mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
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> |
||
---|---|---|
.. | ||
bin | ||
build | ||
channels | ||
cmd | ||
config | ||
einterfaces | ||
enterprise | ||
fonts | ||
i18n | ||
platform | ||
public | ||
scripts | ||
templates | ||
tests | ||
.codecov.yml | ||
.gitignore | ||
.go-version | ||
.golangci.yml | ||
.sass-lint.yml | ||
config.mk | ||
copyright.txt | ||
docker-compose.makefile.m1.yml | ||
docker-compose.makefile.yml | ||
docker-compose.yaml | ||
go.mod | ||
go.sum | ||
Makefile | ||
path.go |