How does Speedtest measure my network speeds?

Speedtest.net works predominantly over TCP testing with a HTTP fallback for most extreme similarity. Speedtest.net estimates ping (latency), download speed and upload speed.

 

TCP Test Components

Latency/Jitter

  1. This test is performed by estimating the time it takes for the server to answer to a solicitation from the client's customer. The customer makes a message on the server, after getting that message, the server sends an answerback. The full circle time is estimated in ms (milliseconds).
  2. This test is rehashed on various occasions with the most minimal worth deciding the end-product.

 

Download

  1. The customer sets up numerous connections with the server over port: 8080. The customer demands the server to send an underlying chunk of data.
  2. The customer computes the continuous speed of the transfers, then, at that point changes the chunk size and buffer size dependent on this computation to expand use of the network connection.
  3. As the chunks are gotten by the customer, the customer will demand more chunks all through the span of the test.
  4. During the principal half of the test, the customer will build up additional connections with the server on the off chance that it decides extra threads are needed to all the more precisely measure the download speed.
  5. The test closes once the configured measure of time has been reached.

 

Upload

  1. The customer sets up numerous connections with the server over the characterized port and sends an underlying chunk of data.
  2. The customer ascertains the real-time speed of the transfers and changes the chunk size and buffer size dependent on it to boost utilization of the  network connection, and demands more data.
  3. As the chunks are gotten by the server, the customer will send more chunks all through the span of the test.
  4. During the principal half of the test, the customer will set up additional associations with the server in the event that it decides extra threads are needed to all the more precisely measure the upload speed.
  5. The test closes once the designed measure of time has been reached.

 

HTTP Legacy Fallback Testing

Latency

  1. This test is performed by estimating the time it takes to get a reaction for a HTTP demand shipped off the web server
  2. This test is rehashed on numerous occasions with the least worth deciding the end result.

 

Download

  1. Little binary files are downloaded from the webserver to the customer to gauge the connection speed
  2. In view of this outcome, one of a few file sizes is chosen to use for the real download test
  3. The test is performed with cache prevention by means of arbitrary threads attached to each download
  4. Throughput samples are gotten at up to 30 times each second
  5. These samples are then totaled into 20 slices (each being 5% of the samples)
  6. See bottom of document for subtleties to fill here (see * underneath for more detail)
  7. The leftover slices are averaged together to decide the eventual outcome

 

Upload Test

  1. A modest quantity of arbitrary data is created in the customer and shipped off the webserver to assess the connection speed.
  2. In view of this outcome, a suitably estimated chunk of randomly created data is chosen for upload.
  3. The upload test is then acted in chunks of uniform size, pushed to the server-side script through POST.
  4. We'll utilize around four HTTP threads here, too, to soak the connection.
  5. Chunks are arranged by speed, and the quickest half is averaged to kill irregularities and decide the outcome.

 

Deciding the number of threads

Speedtest.net will utilize around four HTTP threads during the download and upload bits of the test. Be that as it may, it will possibly utilize multiple threads in the event that they are expected to precisely gauge the speed, in order to limit the impact of HTTP overhead on lower-speed connections. After the pre-test, assuming the connections speed is something like 4 megabits per second, Speedtest.net will utilize four threads. Else, it will default to two threads.

Nonetheless, there is an obstacle on older browsers: Internet Explorer 7 (or prior) and Firefox 2 (or prior), the program rigorously sticks to the HTTP detail of just two threads for each hostname. To increase to four threads in these older browsers, we should open the third and fourth threads to a secondary URL given by the host that focuses to a similar server. Along these lines, we can work around the restrictions of those older browsers and still measure higher-speed connections precisely. A large portion of our hosts do have a functioning secondary URL, however, in case you're testing from an older browser to a host that doesn't, Speedtest.net will be restricted to two threads at the most extreme. This is one motivation behind why we prescribe that all guests up-to-date browsers.

 

How results are determined

All samples are arranged by speed. The two quickest outcomes are eliminated and hte bottom 1/4 which is left (which is around 22% of the aggregate). All the other things are then averaged.