In this article, we have explored how Internet Speed is measured which involves upload and download speed. This will help you understand how speed test by Ookla works and how you can create a similar tool to measure Internet Speed.
Table of Contents:-
- What is Speed Test?
- TCP Test Components
- HTTP Legacy Fallback Testing
- Factors That Affects Speed Test
- Why Should I Test My Internet Speed?
- Acceptable Latency
- Sample Speed Test
What is Speed Test?
Speed Test is a way to measure the speed between a device and a test server employing the device internet connection. However there are some defining factors that can influence the latency rate, which includes the type of device i.e : Phones, PCs, tablets and others. The aformentioned devices have very unique Wi-Fi and cellular radio proficiencies. In conclusion speed test employs TCP testing with a HTTP fallback for utmost affinity. Additionally speed test assess ping (latency), the download speed and upload speed of a device.
TCP Test Components
This type of test is implemented by calculating the time it takes the server to reply the resquest sent by the user's device/client The client sends a message to the server, after receiving the message, the server sends a reply back. The round-trip time is measured is measured in ms (milliseconds).
This is replicated as many times as possible with the lowest value deciding the final outcome.
- The client at first initiate numerous connections with the server at port: 8080. The client behest the server to send an inceptive mass of data.
- The client work out the real-time speed of the transfers, then regulates the mass size and buffer size in relation to the calculation to augment usage of the network connection.
- Just as the mass are received by the device, the device will demand more mass all through the period of the test.
- During the intial stage of the test, the device in operation will initiate additional connections to the server if it establish an additional threads are needed for an accurate measure of the download rate.
- The perfomred check stops at the point that the configured amount of time has been attained.
- The client initiate numerous connections with the server over the defined port and sends a preliminary mass of data.
- The client evaluate the real-time rate of the transfers and adjusts the mass size and buffer size based on it to boost usage of the network connection, and request for more data.
- As soon as the mass are received by the device, the device will demand more mass all through the period of the test
- During the intial stage of the test, the device in operation will initiate additional connections to the server if it establish an additional threads are needed for an accurate measure of the upload rate
- This will stop as soon as the configured amount of time has been gained.
HTTP Legacy Fallback Testing
- HTTP Legacy Fallback Test is carried out by measuring the duration it takes to get response for a HTTP request sent to the web server.
- Test is performed numeorus times with the lowest value shaping the final result.
- Small binary files are downloaded from the web server to the client to evaluate the connection speed.
- Relying on the result , one of the assorted file sizes will be chosen for use in the real download test.
- HTTP Legacy Fallback Test is accomplished with cache prevention via random strings appended to each download.
- Throughput specimen are received at up to 30 times per second These specimen are then assembled into 20 slices (each being 5% of the specimen).
- The fastest 10% and slowest 30% of the slices are then dropped
- The unsettled slices are averaged together to determine the final result.
- A piece of random data is created in the client and sent to the web server to estimate the connection speed.
- In accordance with the establised result, a suitable sized mass of arbitrarily created data is sort out for upload.
- The upload test is then performed in mass of unvaried proportions, sent to the server-side script via POST.
- Up to four HTTP threads will be used to saturate the connection.
- Mass are sorted by speed, and the fastest half is averaged to eliminate anomalies and produce the outcome.
Deciding the number of threads for testing Internet Speed
A standard Speed test tool will make use of up to four (4) http threads in the course the download and upload part of the test. Nevertheless, it will only use more than two threads if they are neccessary to precisely determine the speed, in order to reduce the effect of HTTP overhead on lower-speed connections.
After the preliminary test, if the connection speed is at least 4 megabits per second, then the tool will use four threads. Or else, it will resort to two threads.
With older browser like Internet Explorer 7 and earlier versions of Firefox (Firefox 2 and earlier versions) the browser strictly rigorously stick to the HTTP specification of only two threads per d3dvFor older browsers, to scale up to four(4) threads this means the third and fourth thread will be opened to a secondary URL which is provided by the host that points to the same server. Using this method we can work around the constraint of older browsers and determine the higher speed connections precisely. Modern browser hosts have a working secondary URL, However if the test is perfomred from an older browser to a host that doesn't, Speedtest.net will be limited to two threads at maximum. This is why its advisable to have an udated browser.
Factors That Affects Speed Test
- Devices; They mostly have very non-identical Wi-Fi and cellular radio proficiencies. This subsequently result in getting a speed test outcome on one device and a different outcome on the other. The speed test does not rely Internet Service Provider(ISP) . The Wi-Fi router may not aid the full speed of your service.
- Servers; Speed test servers may perform adversely. More oftne than not, the proximity of the servers to the device will produce faster speed. It advised testing to a variation of test servers to get the best outcome of your speed. Moreover speed testing services use different servers in different locations so differences in speeds between testing services are not uncommon.
- Browsers; This include Chrome, Firefox, Edge, Safari, etc… have contrasting aptness and most likely provide different results, especially on high-speed connections.
Why Should I Test My Internet Speed?
Traditional speed tests evaluate yield, it is principal to measure Internet quality of your connection. Your ISP(Internet Service Provider) can use old copper connections and others dispathc your service through fiber optic connectivity. These, and considering other factors, may impact latency, jitter and packet loss. And, these affect your bandwidth quality.
Subject to the fact maybe you are using your internet connection for VoIP, video conferencing or an all-important applications, you may need a higher quality service. Speed test does this for you and helps highlight potential risks to your business.
Using an Online Game as a case study. Have you ever noticed that an oppossing player always seems to have the jump on you? This maybe as a result of the player having a faster ping(latency). In general, an acceptable latency (or ping) is anywhere between 40 – 60 milliseconds (ms) or lower, while a speed of over 100ms will usually mean a noticeable lag in gaming. Below is a guideline:
Winning: 0-59 ms
In the game: 60-129 ms
Struggling: 130-199 ms
Game over: 200+ ms
But for general browsing and streaming, anything under 100ms is fine.
With this article at OpenGenus, you must have the complete idea of how Internet Speed test works.