Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable per message deflate on server #8314

Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b5b50b6
Do not give SummaryWrite scope to clients that are not summarizers
pradeepvairamani Sep 28, 2021
f0b8a83
Merge branch 'microsoft:main' into main
pradeepvairamani Sep 28, 2021
bce9f61
Merge remote-tracking branch 'upstream/main'
pradeepvairamani Oct 1, 2021
0de1116
Merge branch 'main' of github.com:pradeepvairamani/FluidFramework
pradeepvairamani Oct 1, 2021
d72f0a8
Merge remote-tracking branch 'upstream/main'
pradeepvairamani Oct 4, 2021
69a6e6c
Merge remote-tracking branch 'upstream/main'
pradeepvairamani Oct 5, 2021
1d056c8
Deli lumberjack logs
pradeepvairamani Oct 6, 2021
f0336bc
Merge branch 'microsoft:main' into main
pradeepvairamani Oct 6, 2021
a4a1352
Merge remote-tracking branch 'upstream/main'
pradeepvairamani Oct 7, 2021
b48f8a9
Merge branch 'main' of github.com:pradeepvairamani/FluidFramework
pradeepvairamani Oct 7, 2021
b11b1dc
Merge remote-tracking branch 'upstream/main'
pradeepvairamani Oct 12, 2021
05e9e60
Merge remote-tracking branch 'upstream/main'
pradeepvairamani Oct 12, 2021
a047b8a
Merge remote-tracking branch 'upstream/main'
pradeepvairamani Oct 14, 2021
6ad8dc3
Merge remote-tracking branch 'upstream/main'
pradeepvairamani Oct 15, 2021
beb0fc6
Merge remote-tracking branch 'upstream/main'
pradeepvairamani Oct 15, 2021
0e78ccd
Merge remote-tracking branch 'upstream/main'
pradeepvairamani Oct 16, 2021
38b6b21
Merge remote-tracking branch 'upstream/main'
pradeepvairamani Oct 19, 2021
ce21c8b
Merge remote-tracking branch 'upstream/main'
pradeepvairamani Oct 19, 2021
dd28a73
Merge remote-tracking branch 'upstream/main'
pradeepvairamani Oct 21, 2021
e7747ab
Merge remote-tracking branch 'upstream/main'
pradeepvairamani Oct 22, 2021
6de6b09
Merge remote-tracking branch 'upstream/main'
pradeepvairamani Oct 25, 2021
baff178
Merge remote-tracking branch 'upstream/main'
pradeepvairamani Oct 28, 2021
c6fe460
Merge remote-tracking branch 'upstream/main'
pradeepvairamani Nov 5, 2021
2e1e3d4
Merge remote-tracking branch 'upstream/main'
pradeepvairamani Nov 8, 2021
6ac283c
Merge remote-tracking branch 'upstream/main'
pradeepvairamani Nov 9, 2021
f7aeb98
Merge remote-tracking branch 'upstream/main'
pradeepvairamani Nov 16, 2021
3e73532
Merge remote-tracking branch 'upstream/main'
pradeepvairamani Nov 17, 2021
db3e80e
Enable permessage deflate flag
pradeepvairamani Nov 17, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -119,7 +119,8 @@ export function create(
const io = new Server(server, {
// enable compatibility with socket.io v2 clients
allowEIO3: true,
perMessageDeflate: false,
// Indicates whether a connection should use compression
perMessageDeflate: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible that this setting can cause a spike in memory as we suspected last time we turned it off? If yes, do we want to make it configurable through config.json, so it's easier to disable that if needed during an emergency?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the same concern. There can be a CPU and memory spike (gorilla/websocket#203).

@GaryWilber Does push enable it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I saw Henrique's comment after merging the code. Will add the config as he suggested. Push is not enabling it because AFD does not support this extension. With respect to the memory and cpu consumption, pasting the offline conversation I had with Henrique:

It is a valid point but I do not think we will get affected by it for a few reasons:

The theory that this flag was causing the memory issues is probably not true. The default for this flag was always false..I just added this line explicitly to make doubly sure.

This comes into play only for socket payloads that are more than 1mb..that that does not happen in most cases for us

I stress tested it pretty extensively and did not see any difference in the memory or cpu usage

// ensure long polling is never used
transports: [ "websocket" ],
cors: {
Expand Down