librespeed / speedtest-cli

Command line client for LibreSpeed
GNU Lesser General Public License v3.0
487 stars 60 forks source link

How are multiple requests to a single server handled? #25

Closed natzlob closed 3 years ago

natzlob commented 3 years ago

What is the mechanism or technology used to handle having many requests to the same server, and is there a limit on the number of simultaneous requests to one server, and what is that limit/capacity?

maddie commented 3 years ago

It uses go routines to initiate HTTP requests.

The CLI itself doesn't limit how many concurrent requests can be made, and the current default setting is 3. You can change this with --concurrent flag. The actual limit/capacity would most likely be on the server-side.

natzlob commented 3 years ago

I wanted to know how you handle it on the librespeed server side. What is the limit on each of the librespeed-hosted servers?

maddie commented 3 years ago

I wanted to know how you handle it on the librespeed server side. What is the limit on each of the librespeed-hosted servers?

This depends on your server's connection and configuration. Librespeed backend does not have an artificial limitation.

natzlob commented 3 years ago

Thanks, but what is the actual physical limit, when requests by hosts will get rejected? Will your servers be able to handle it if suddenly thousands more requests from as many different hosts are made to them every 10-20min?

adolfintel commented 3 years ago

That depends on your server, if it has enough bandwidth and processing power there is no artificial limit imposed by LS.