How Does the Internet Speed Test Work?
In this post, discover the numerous tools to measure internet speed, and explore why it is essential to understand how these tools work.
Join the DZone community and get the full member experience.Join For Free
Everyone deserves the right internet speed and everyone wants the best bang for a buck. To ensure our internet bandwidth, we all run speed tests from our Internet Speed Provider or public speed test tools like fast.com or speed.cloudflare.com and more. But do we know how the speed got measured under the hood? In this blog post, we will see how the Internet Speed Test works.
What Is an Internet Speed Test?
The Internet Speed Test helps us to understand how fast our internet connection is. It is primarily based on Download and Upload speed, usually measured in megabits per second (Mbps), but varies based on which tool you are using. One megabit is equal to 1,024 kilobits.
Tools to Measure Your Internet Speed Test
There are numerous ways you can perform the speed test:
- Fast.com from Netflix
- Cloudflare's speed.cloudflare.com
- widely known SpeedTest.net
- your ISP speed test tool e.g. https://speedtest.xfinity.com/
- Command Line tools such as Apple's networkQuality or Speedtest CLI and more
- Search engine tools e.g. Google or Bing
How Does the Internet Speed Test Work?
Now we are equipped with the knowledge of what internet speed is and its tools. Let us understand how these tests work? Every tool's mechanics vary based on its architecture, but overall it works as follows.
When you start the test, first it identifies your location. i.e. from where the test is being triggered. Some tools reveal your location. e.g. Cloudflare displays IP, server location, etc. as shown below.
By default, it will connect to the nearest server, but in a few tools, such as SpeedTest.net, you have an option to change the server.
The first step in measuring the speed is by running a
ping test. Ping measures the roundtrip time. The Ping's measurement should be less than 100ms. The lower the ping value, the better speed you get.
Some tools provide jitter value, i.e. the average distance between consecutive ping measurements. The lower the jitter, the better the connection.
After pinging is done, almost all the speed test tools begin to measure the download speed. Tools like Fast.com focus primarily on download speed, rather than upload speed.
The client (browser or mobile) will begin downloading a small amount of data from the test server. If your client is able to download the data faster, the tool will begin to download more data.
E.g. bing's speed test will download a simple text file, then it will begin to download an extra-large text file.
But fast.com uses only one file size repeatedly to measure the download speed. This file size might vary based on the internet bandwidth.
Cloudflare Speed Test begins with the first set of download speeds e.g. 100 kB and 1 MB test, then it will start the next set of upload speed tests e.g.100 kB and 1 MB. Then, it will go to the next tier of download speed, e.g. 100 MB and 25 MB, and then the next set of upload speeds of 100 MB till it saturates.
The Xfinity speed test uses varying file sizes to test the download speed.
After download and upload tests are done, the tool will aggregate the measurements and display the download and upload speed on the page.
Most of the speed test tools allow customization of the number of parallel connections for the client.
Before Running the Speed Test
Please follow the below tips before you trigger the speed test:
- Connect your client to the Ethernet cable.
- Disconnect any VPNs
- Do not play any video or audio
- Do not play games
- Disconnect other connected devices from the internet
- You may run the test after clearing cache and cookies or in incognito
- Perform the tests at various intervals, such as busy morning, noon, evening, and night and over the weekends
- Do not use your ISP's speed test tool, they might show you better numbers
- Restart your modem/router if required
Collate all the results for your future reference. There are mobile apps that keep a log of your internet speed test results.
After Running the Speed Test
Once you are done with your tests if you are not getting the promised speed from your ISP. Before reaching out to them, you can tune the performance by upgrading your router, e.g. Wi-Fi 6, finding the blind spots at your home to improve the speed, switching it to the 5GHz spectrum, and changing the channel to the least crowded, and more.
If you are still not getting enough speed, it is time to contact your ISP. Always keep in mind, that there will be always an up to statement in your ISP's plan, e.g. up to 50 Mbps :)
All we need is a reliable and faster internet connection for our work, education, entertainment, games, connecting with our families, and more. There are numerous tools out there to measure internet speed, and it is essential to understand how it works. Personally, I like Cloudflare's Speed Test as it throws a lot of data visually, and you can even download it in CSV format. Periodically, it is good practice to validate our internet speed so that everyone will get the best bang for a buck.
Published at DZone with permission of NaveenKumar Namachivayam, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.