LibreSpeed: Speedtest No Flash, No Java, No Websocket, No Bullshit.
LibreSpeed: Speedtest No Flash, No Java, No Websocket, No Bullshit.

github.com
GitHub - librespeed/speedtest: Self-hosted Speed Test for HTML5 and more. Easy setup, examples, configurable, mobile friendly. Supports PHP, Node, Multiple servers, and more

cross-posted from: https://lemm.ee/post/39429103
Wait, why would you not use a websocket for this?
My guess that websocket add additional overhead both in size (header) and complexity as browser and server need to encode/decode it making it more CPU intensive not to mention harder to implement.
I've implemented it myself, down to the encoding and buffer management.
It's a really simple back and forth first, but after that it's just dumping arbitrary binary data through the socket