measure speed from server?

hello all -

can anybody think of a way for a server to determine the internet speed for an individual connection?

i know i can visit from the clients side, but i was wondering if there is some slick way to do this when somebody first tries to pull up one of my webpages.

in other words, say somebody makes a request for one of my webpages on my server. i would like some way to determine the line speed. i sure didn't see anything at all in HTTP_USER_AGENT.

or am i dreaming again?


Staff member
You can use wget for download speeds:

--2013-04-27 07:23:44--
Connecting to||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 91415315 (87M) [application/octet-stream]
Saving to: "latest_kernel_20"

100%[======================================>] 91,415,315 10.9M/s in 8.1s

2013-04-27 07:23:52 (10.8 MB/s) - "latest_kernel_20" saved [91415315/91415315]

Here it is 10.9 M/s or about 87 mbps.
that works for the server at, but lets say i wanted to determine the speed (and line quality) for every one of my customers.

for example right now i am at home in Arizona, and John Q is in New Jersey (i am assuming), it would be so cool to have a way to determine what my speed is, and what johns speed is, all from my server.

i should hope that there is something like HTTP_USER_AGENT that would tell me this.


Staff member
Server side I am not certain of a way, and it may not be possible server/vps side, at least automatically. You would need to download/upload data between both points to get a known speed (like does)

It is not impossible, at least there are some CDN's I know in the past that used to try to measure speed by sometimes doing a traceroute to the connecting IP so on the network edge with the right hardware some places do something similar.
well thanks for trying, Q.

one would think (or assume) that type of information would be readily available with some obscure apache function.