Hey, Nice Article.
one other thing I was expecting from this was that how speedtest works internally. How the speed of the internet is measured. It would be great if you could add that part also here
From my observations in the speedtest-cli code, it appears that each major data center is hosting the server-side part where speedtest-cli uploads to and downloads from as part as those tests. It also collects the upload, download speeds, latency of the connection and also naming information about the data center itself.
But here is the most important part: The upload and download tests are sending chunks of data in an interval. Sequences of repeated0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ strings. The size of each chunk is about 10KB. It's probably to give speedtest a more uniform measurement of how fast that chunk size gets through, as opposed to sending strings of different sizes.
Here is where the chunk data is assembled. Then it's put in a GET or PUT request depending on the test. The function name is a misnomer: It doesn't actually read anything from a file even though it's called for both upload and download tests.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey, Nice Article.
one other thing I was expecting from this was that how speedtest works internally. How the speed of the internet is measured. It would be great if you could add that part also here
From my observations in the speedtest-cli code, it appears that each major data center is hosting the server-side part where speedtest-cli uploads to and downloads from as part as those tests. It also collects the upload, download speeds, latency of the connection and also naming information about the data center itself.
But here is the most important part: The upload and download tests are sending chunks of data in an interval. Sequences of repeated
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
strings. The size of each chunk is about 10KB. It's probably to give speedtest a more uniform measurement of how fast that chunk size gets through, as opposed to sending strings of different sizes.Here is where the chunk data is assembled. Then it's put in a GET or PUT request depending on the test. The function name is a misnomer: It doesn't actually read anything from a file even though it's called for both upload and download tests.