Agniva De Sarker
a246104d04
MM-21012: Revamp websocket implementation ( #16620 )
...
* MM-21012: Revamp websocket implementation
We replace the old gorilla/websocket implementation with the
gobwas/ws library. The gorilla library was in maintenance mode
and had a high level API due to which we cannot use that for
situations where a large number of concurrent connections needs
to be supported.
The ws library is a very low-level library that allows us
to work with raw net.Conns. We make several improvements:
- We completely remove the reader goroutines, and instead
replace them with a manual epoll implementation which sends off
messages to be read when it receives any data on the connection.
This lets us scale to a much larger number of connections.
- The reader buffer is eliminated, because we directly read
from the connection now.
https://mattermost.atlassian.net/browse/MM-21012
```release-notes
Improved the websocket implementation by using epoll manually
to read from a websocket. As a result, the number of goroutines
is expected to go down by half.
```
* fix tests
* fix shadowing errors
* final changes
* windows support!
* Remove pointer to waitgroup
* Fix edge case
* Trigger CI
* Trigger CI
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-02-13 23:42:11 +05:30
..
2021-01-04 11:32:29 +05:30
2021-02-13 23:42:11 +05:30
2021-02-04 11:08:05 +05:30
2021-02-05 11:22:27 +01:00
2021-02-05 11:22:27 +01:00
2021-02-05 11:22:27 +01:00
2021-02-13 23:42:11 +05:30
2020-11-18 18:40:12 +03:00
2021-02-09 11:58:31 +01:00
2021-02-05 11:22:27 +01:00
2021-01-07 22:42:43 +05:30
2020-11-23 14:34:10 -05:00
2021-01-07 22:42:43 +05:30
2021-02-05 11:22:27 +01:00
2021-01-07 22:42:43 +05:30
2021-02-05 11:22:27 +01:00
2021-02-11 15:32:48 +05:30
2021-02-12 19:04:05 +05:30
2021-01-25 11:15:17 +01:00
2021-01-07 22:42:43 +05:30
2021-01-04 11:32:29 +05:30
2020-12-02 12:06:23 +01:00
2021-02-05 11:22:27 +01:00
2021-02-12 19:04:05 +05:30
2021-02-12 19:04:05 +05:30
2020-12-03 16:02:43 -05:00
2021-01-07 22:42:43 +05:30
2021-01-15 09:58:34 +03:00
2020-06-12 13:43:50 +02:00
2020-05-22 23:52:25 +05:30
2021-01-07 22:42:43 +05:30
2020-11-13 21:10:07 -05:00
2021-02-12 19:04:05 +05:30
2020-11-24 21:36:34 +05:30
2020-12-02 12:06:23 +01:00
2021-01-28 20:04:17 +01:00
2021-01-04 11:32:29 +05:30
2020-02-13 13:26:58 +01:00
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-02-12 19:04:05 +05:30
2021-01-07 22:42:43 +05:30
2021-02-09 12:28:42 +01:00
2021-01-25 11:15:17 +01:00
2021-01-07 22:42:43 +05:30
2021-02-09 11:58:31 +01:00
2021-01-07 22:42:43 +05:30
2020-07-15 18:56:28 +05:30
2020-03-23 09:21:05 -04:00
2021-02-09 11:58:31 +01:00
2021-02-12 19:04:05 +05:30
2020-01-27 11:33:11 -05:00
2021-01-07 22:42:43 +05:30
2020-10-29 15:54:39 -07:00
2021-02-05 11:22:27 +01:00
2021-02-05 11:22:27 +01:00
2021-02-08 14:41:07 +05:30
2021-01-07 22:42:43 +05:30
2021-02-05 11:22:27 +01:00
2021-02-02 11:28:31 +01:00
2020-10-09 08:47:20 +02:00
2021-02-05 11:22:27 +01:00
2021-02-09 11:58:31 +01:00
2021-02-05 11:22:27 +01:00
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-01-25 11:15:17 +01:00
2021-01-25 10:40:30 +01:00
2021-01-25 11:15:17 +01:00
2021-02-12 19:04:05 +05:30
2021-01-07 22:42:43 +05:30
2020-08-20 19:37:19 +05:30
2021-01-15 09:58:34 +03:00
2021-01-07 22:42:43 +05:30
2021-01-20 19:57:29 +03:00
2021-01-07 22:42:43 +05:30
2021-01-25 11:15:17 +01:00
2020-09-09 15:25:55 -04:00
2021-01-04 11:32:29 +05:30
2021-01-15 09:58:34 +03:00
2021-02-09 12:28:42 +01:00
2021-02-05 11:22:27 +01:00
2021-02-05 11:22:27 +01:00
2021-02-05 11:22:27 +01:00
2021-02-12 19:04:05 +05:30
2021-02-04 11:08:05 +05:30
2021-02-12 19:04:05 +05:30
2021-01-07 22:42:43 +05:30
2020-02-13 13:26:58 +01:00
2021-01-28 20:04:17 +01:00
2021-01-07 22:42:43 +05:30
2021-01-12 20:45:17 +01:00
2021-02-04 11:08:05 +05:30
2021-01-25 11:15:17 +01:00
2021-02-05 11:22:27 +01:00
2021-02-09 12:28:42 +01:00
2021-01-07 22:42:43 +05:30
2021-02-05 11:22:27 +01:00
2021-01-07 22:42:43 +05:30
2020-03-13 21:12:20 +01:00
2020-02-13 13:26:58 +01:00
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-01-15 09:58:34 +03:00
2021-01-15 09:58:34 +03:00
2019-12-05 23:41:52 +04:00
2021-02-05 11:22:27 +01:00
2020-07-13 19:34:05 +02:00
2021-01-07 22:42:43 +05:30
2021-01-15 09:58:34 +03:00
2020-09-22 10:57:08 +02:00
2021-02-08 16:31:13 -04:00
2021-01-31 09:17:46 +01:00
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-02-05 11:22:27 +01:00
2021-02-12 19:04:05 +05:30
2021-02-05 11:22:27 +01:00
2021-02-04 11:08:05 +05:30
2021-02-05 11:22:27 +01:00
2021-01-07 22:42:43 +05:30
2021-02-05 11:22:27 +01:00
2021-02-04 11:08:05 +05:30
2019-11-29 12:59:40 +01:00
2021-01-07 22:42:43 +05:30
2020-09-24 11:49:57 -04:00
2020-02-13 13:26:58 +01:00
2020-10-04 10:12:29 +05:30
2020-09-16 21:46:44 +05:30
2021-01-25 11:15:17 +01:00
2021-01-07 22:42:43 +05:30
2021-02-01 15:18:52 -05:00
2021-02-13 23:42:11 +05:30
2021-01-07 22:42:43 +05:30
2021-02-12 19:04:05 +05:30
2021-02-05 11:22:27 +01:00
2021-02-12 19:04:05 +05:30
2021-01-07 22:42:43 +05:30
2021-02-05 11:22:27 +01:00
2019-11-29 12:59:40 +01:00
2021-01-25 11:15:17 +01:00
2021-01-07 22:42:43 +05:30
2020-11-17 09:02:36 +05:30
2021-02-05 11:22:27 +01:00
2021-02-12 19:04:05 +05:30
2021-02-05 11:22:27 +01:00
2021-01-07 22:42:43 +05:30
2021-02-05 11:22:27 +01:00
2020-03-19 11:18:17 +01:00
2020-03-19 11:18:17 +01:00
2020-06-19 17:49:30 +05:30
2021-02-05 11:22:27 +01:00
2021-02-10 23:41:34 +05:30
2021-01-07 22:42:43 +05:30
2021-02-12 19:04:05 +05:30
2020-04-23 13:16:18 +05:30
2021-02-13 23:42:11 +05:30
2021-02-13 23:42:11 +05:30
2021-02-13 23:42:11 +05:30
2021-02-05 11:22:27 +01:00
2021-02-12 19:04:05 +05:30
2021-02-05 11:22:27 +01:00
2021-01-15 09:58:34 +03:00