Packet Loss Test

Technology

So, at a basic level, when you connect, it downloads the web page over HTTPS, the site and the server then establish a WebSockets connection, and then the site and the server uses an external STUN server to negotiate a WebRTC connection. The site then establishes an unreliable data channel using WebRTC and sends a bunch of packets to the server, which records them and then sends them right back. The client then records the ping times and which ones it got back. The server also sends a log over WebSockets of which packets made it up, so that you can tell upload packet loss versus download packet loss.

Services Used

So, as for the specific technologies and services used:

  • The SSL certificate is provided by Let's Encrypt.
  • The static HTTPS website is hosted on Netlify, which pulls from GitHub.
  • The WebSocket and WebRTC server is hosted with Linode.
  • This WebSocket and WebRTC server runs Node.js as the server software.
  • Node.js runs uWebSockets.js, which in turn runs uWebSockets (Which, being C++, is much faster than JavaScript could ever be.)
  • The server then uses wrtc to implement WebRTC in Node.js. (Since it does not implement that. WebRTC is not actually JavaScript, but just a JavaScript API in WebIDL.)
  • I use Google's free public STUN server (stun.l.google.com:19302) to make the ICE connection.
  • Chart.js renders the bar chart at the bottom of the results.
  • Everything is basically just manually-coded HTML, CSS, JS, and Bash. I do use Mustache (in JavaScript) server-side to template the pages so they're easier to translate (with views) and to change the common parts (with partials).
  • Also, for translation, I largely (But not entirely!) used Google Translate. >.>
    Also, DeepL and Linguee were amazing helps that I wholly recommend.