That tells the server that browser can handle compressed messages. But, as of now, BigBlueButton is ignoring that header.
The easiest way to take advantage of this is to edit /usr/share/meteor/bundle/systemd_start_frontend.sh file:
#export SERVER_WEBSOCKET_COMPRESSION=0
export SERVER_WEBSOCKET_COMPRESSION='{"level":5,
"maxWindowBits":13, "memLevel":7,
"requestMaxWindowBits":13}'
The first parameter "level" is recommended to be set between 4 and 6. All three options are good compression for little cpu being 6 the highest compression and 4 the most cpu. Other level of compressions are not suitable for this situation.
I already have this in my 2.5.4 production server with level 4 and i have not seen any noticeable cpu impact. And i think, there should not be.
This is how the responde headers will like after applying this:
After applying this fix i could save about 90% of the data size transferred via websocket in a long meeting.
Extra: Screenshot and notes about repeated messages:
This screenshot shows 107 messages filtered by the word "rect" when i just joined a meeting. It was meant to show 10 messages because there was 10 rectangles. And hopefully, after the fix it will be only one or a few messages for all the whiteboard.
excessive-annotation-messages-few-rectangles.png
Test # 1. Draw 10 rectangles. Then join with another user:
on 2.5.4 = i recieved 107 rectangle messages
on 2.6.0-alpha.2 = i received 15 rectangle messages. I could not find whey some are repeated and some are not. So
Test #2. Draw 1 rectangle. Then join with another user:
on 2.5.4 = 7 rectangle messages (NUMBER_OF_BACKEND_NODEJS_PROCESSES=3, NUMBER_OF_FRONTEND_NODEJS_PROCESSES=6). Note that if processes number are reduced, the number of messages tend to decrease.
on 2.6.0-alpha.2 = sometimes 1 and sometimes 2 (Apparently number of processes did not matter much in this version). It was not clear why there is a variation in the results with the same steps.
Extra: Websocket repeated message example:
This message is the same trinagle sent 3 times (usually more in v 2.5.4). It has the same field id, but the message id is different for some of them.
a["{"msg":"added","collection":"annotations","id":"9E82ZaK7aaWYr3jef","fields":{"id":"0f1d67c7-e0ce-4953-1058-f459ed13cbf5","meetingId":"f4d29f359ccea5fe23da85606b44e7cd13de578a-1661909019963","userId":"w_xiqq1swzeeut","annotationInfo":{"size":[474.79,347.41],"style":{"isFilled":false,"size":"small","scale":1,"color":"black","dash":"draw"},"label":"","rotation":0,"id":"0f1d67c7-e0ce-4953-1058-f459ed13cbf5","labelPoint":[0.5,0.5],"type":"triangle","parentId":"1","childIndex":1.5,"name":"Triangle","point":[849.71,341.17]},"wbId":"97b150e9176a5ded62f150009509d6390450cadd-1661909020050/1","whiteboardId":"97b150e9176a5ded62f150009509d6390450cadd-1661909020050/1"}}"]
a["{"msg":"added","collection":"annotations","id":"9E82ZaK7aaWYr3jef","fields":{"id":"0f1d67c7-e0ce-4953-1058-f459ed13cbf5","meetingId":"f4d29f359ccea5fe23da85606b44e7cd13de578a-1661909019963","userId":"w_xiqq1swzeeut","annotationInfo":{"size":[474.79,347.41],"style":{"isFilled":false,"size":"small","scale":1,"color":"black","dash":"draw"},"label":"","rotation":0,"id":"0f1d67c7-e0ce-4953-1058-f459ed13cbf5","labelPoint":[0.5,0.5],"type":"triangle","parentId":"1","childIndex":1.5,"name":"Triangle","point":[849.71,341.17]},"wbId":"97b150e9176a5ded62f150009509d6390450cadd-1661909020050/1","whiteboardId":"97b150e9176a5ded62f150009509d6390450cadd-1661909020050/1"}}"]
a["{"msg":"added","collection":"annotations","id":"NjHthuAb54qeB7qvn","fields":{"id":"0f1d67c7-e0ce-4953-1058-f459ed13cbf5","meetingId":"f4d29f359ccea5fe23da85606b44e7cd13de578a-1661909019963","userId":"w_xiqq1swzeeut","annotationInfo":{"size":[474.79,347.41],"style":{"isFilled":false,"size":"small","scale":1,"color":"black","dash":"draw"},"label":"","rotation":0,"id":"0f1d67c7-e0ce-4953-1058-f459ed13cbf5","labelPoint":[0.5,0.5],"type":"triangle","parentId":"1","childIndex":1.5,"name":"Triangle","point":[849.71,341.17]},"wbId":"97b150e9176a5ded62f150009509d6390450cadd-1661909020050/1","whiteboardId":"97b150e9176a5ded62f150009509d6390450cadd-1661909020050/1"}}"]
Regards,
Pablo - BBBPlugin