-
Notifications
You must be signed in to change notification settings - Fork 645
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
Support no-masking extension #2987
Comments
Thanks for the suggestion. Clients can also use websocket::stream::secure_prng to disable the secure PRNG. Performance measurements are needed to determine how much gain is achievable by completely disabling masking and whether it is worthwhile. Additionally, the referenced RFC is still a draft, so introducing a feature that breaks the current standard may not be advisable. |
I did some benchmarking to compare boost::beast websocket performance inside our application framework. There is some overhead in the framework itself, so this isn't a raw comparison of boost::beast performance. I ran the tests in three configurations, doing the benchmark 20 times and selecting the best.
Timings came out (server and client on the same low-end embedded platform, transferring 100 MB of messages)
I did some less-rigorous testing on x86, and there all three appear to fall within 3% of each other. Surprisingly, on x86 the PRNG change giving sligthly more gain than the no-masking. So it appears that a no-masking extension could make sense in scenarios where you are CPU constrained. |
Re
Yeah, when the extension is negotiated, I guess we'd be ignoring some MUSTs in the current rfc. It would have to be opt-in on both server and client, at least... |
I am working with software that has a number of websocket clients ; some on the local machine over local sockets, some over SSL tunnels, some over TCP, etc.
For the clients running in a secure context, I wouldn't mind saving a few CPU cycles by skipping the standard websocket masking. What I want is perfectly covered by a draft RFC, and I was wondering if this would be interesting to Boost.Beast.
I could try to make a PR at some point, but won't bother if there's no interest in the feature from core developers. =)
https://datatracker.ietf.org/doc/draft-damjanovic-websockets-nomasking/
The text was updated successfully, but these errors were encountered: