What do you measure?

This website measures the minimum round-trip time (RTT) and maximum segment size (MSS) for each TCP connection. The RTT is the delay between when this server sends a TCP segment and when it receives an acknowledgement from your device. The MSS is largest amount of data that can be sent in a single TCP segment. TCP is one of the most common protocols on the internet and is used by most websites and apps.

Why should I care?

Large round-trip times or small maximum segment sizes can negatively affect your internet connection. The round-trip time is the primary factor limiting how quickly a new TCP connection can be opened. A large round-trip time can cause delays when connecting to websites or other services. The round-trip time is affected by the physical distance between your computer and the server and by the network equipment each packet traverses. Changes in the round-trip time between requests can indicate that the network does not have enough bandwidth. The maximum segment size is negotiated by the server and your computer and is usually set to the largest segment that can be sent in a single packet. A smaller maximum segment size means that more of your bandwidth is spent on protocol overhead and not on the data that is being moved. The maximum segment size is often reduced by tunneling protocols used by VPNs and by some internet service providers and mobile network operators.

How does it work?

When your computer connects to this website, the TCP implementation in the Linux Kernel keeps track of the minimum RTT and the effective MSS. When the TCP connection is closed, an eBPF program extracts that information. The connection details are then stored temporarily in Redis for quick retrieval. When the server observes a new address, it attempts to connect back to that address to take a set of latency measurements in the reverse direction. Connections in both directions are included in the minimum RTT for each address and a large difference between the minimum RTT and the connection RTT can indicate that a delay is occurring within a tunnel or prior to network address translation. The website itself is hosted with NGINX and Flask. The graphs and dynamic tables are created with D3.js.