4 ms·
And now, even WebSockets over TLS need servers to waste CPU on XOR masking.
by jorangreef 8y ago
And now, even WebSockets over TLS need servers to waste CPU on XOR masking.
- jefftk 8y agoXOR masking is ridiculously cheap compared to doing anything over the network or running js in general.
- adrianN 8y agoEverything is slow because of a million "don't worry, it's cheap compared to the rest" decisions accumulating over time.
- jefftk 8y agoI think "why is everything slow" is actually a really important question, but I'm not sure it's primarily lots of "this is cheap compared to X" decisions. A big driver here I think is layers of abstractions and inner platforms. I check my email in by browser now, I used to use mutt. Webmail on top of JS on top of browser on top of OS (with several of those systems having their own layers and places that add latency) is great from a perspective of checking email from anywhere but it's a lot slower than C on the OS directly. I recently got into doing a lot of live music for dances on my mac, and I've ended up writing everything directly against CoreMIDI in C. Sure, it's would be more convenient to write in Python, but latency in music is even more painful than elsewhere.
- ric2b 8y agoAnd yet the network is still horribly slower, so I guess those assumptions are correct?
- gnode 8y agoThis may be because it's common for load balancers / reverse proxies to strip the TLS off before handing it to the back end (which may not even support WS over TLS). If the TLS encapsulated WS removed the XOR mask, it would require such a reverse proxy to add it on, rather than blindly forward the connection.
- olliej 8y agoCorrect, the problem is edge routers unwrapping and inspecting tls packets before forwarding to the internal network. So it’s not wasted due to tls. I mean it’s still a dumb waste of cpu cycles to support unfixed/unfixable routers, but there isn’t really a choice. Womp womp.
- olliej 8y agoNah, it’s still needed - see @gnode’s answer