1
mirror of https://github.com/jakejarvis/datacenter-speed-tests.git synced 2026-07-05 19:03:54 -04:00

first commit :)

This commit is contained in:
2019-03-11 13:13:19 -04:00
commit a1936898c6
3 changed files with 191 additions and 0 deletions
+113
View File
@@ -0,0 +1,113 @@
# Speed & Ping Tests for Cloud Hosting Providers
Shell script to test speed and pings to the following datacenters:
**Notes:**
- Speed tests for ***each datacenter*** can use up to **100MB of data**. Be careful if your ISP caps your data usage!
- Files are downloaded via HTTP (not HTTPS) to get pure speed without encryption overhead.
- If it looks like the script is doing nothing, the current test is probably just taking a while — especially when testing far-away regions. If you already know that testing other continents is futile, just remove them from the for loops. (progress indicators are on the to-do list!)
- AWS and GCP tests courtesy of [CloudHarmony](https://cloudharmony.com/).
- Tests can always be influenced by outside variables. Run the scripts multiple times if you want to ensure accuracy. Obviously, evil throttling ISPs can mess up the results too.
**Usage:**
If you trust me, these commands will download and run the scripts:
```
curl -o- https://raw.githubusercontent.com/jakejarvis/datacenter-speed-tests/master/ping.sh | bash
curl -o- https://raw.githubusercontent.com/jakejarvis/datacenter-speed-tests/master/speed.sh | bash
```
Or, clone the repository and make sure you make the scripts executable before running:
```
git clone https://github.com/jakejarvis/datacenter-speed-tests.git
cd datacenter-speed-tests
chmod +x ping.sh && chmod +x speed.sh
./ping.sh
./speed.sh
```
**DigitalOcean:** [(locations)](https://www.digitalocean.com/docs/platform/availability-matrix/#datacenter-regions)
- NYC1
- NYC2
- NYC3
- SFO1
- SFO2
- TOR1
- LON1
- FRA1
- AMS2
- AMS3
- SGP1
- BLR1
**Linode:** [(locations)](https://www.linode.com/linodes#features-dc-container)
- Newark
- Atlanta
- Dallas
- Fremont
- London
- Frankfurt
- Singapore
- Tokyo
**Amazon Web Services:** [(locations)](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html)
- us-east-1
- us-west-1
- us-west-2
- eu-central-1
- eu-west-1
- eu-west-2
- ap-northeast-1
- ap-south-1
- ap-southeast-1
- ap-southeast-2
- sa-east-1
**Google Cloud:** [(locations)](https://cloud.google.com/compute/docs/regions-zones/)
- us-central1
- us-east1
- us-east4
- us-west1
- northamerica-northeast1
- asia-east1
- asia-east2
- asia-northeast1
- asia-south1
- asia-southeast1
- australia-southeast1
- europe-north1
- europe-west1
- europe-west2
- europe-west3
- europe-west4
- southamerica-east1
**Vultr/Choopa:** [(locations)](https://www.vultr.com/locations/)
- nj-us
- il-us
- ga-us
- fl-us
- tx-us
- sjo-ca-us
- lax-ca-us (down at time of commit)
- wa-us
- tor-ca
- fra-de
- ams-nl
- par-fr
- lon-gb
- syd-au
- sgp
- hnd-jp
---
Inspired by https://www.reddit.com/r/webdev/comments/6ylmki/heres_an_easy_way_to_find_the_nearest/
Executable
+40
View File
@@ -0,0 +1,40 @@
echo "DigitalOcean Ping Test: \n"
for DC in NYC1 NYC2 NYC3 SFO1 SFO2 TOR1 LON1 FRA1 AMS2 AMS3 SGP1 BLR1
do
echo "$DC: $(ping -i .2 -c 10 -q speedtest-$DC.digitalocean.com | awk -F/ '/^round|^rtt/{print $5}') ms"
done
echo ""
echo "Linode Ping Test: \n"
for DC in Newark Atlanta Dallas Fremont London Frankfurt Singapore Tokyo2
do
echo "$DC: $(ping -i .2 -c 10 -q speedtest.$DC.linode.com | awk -F/ '/^round|^rtt/{print $5}') ms"
done
echo ""
echo "AWS Ping Test: \n"
for DC in us-east-1 us-west-1 us-west-2 eu-central-1 eu-west-1 eu-west-2 ap-northeast-1 ap-south-1 ap-southeast-1 ap-southeast-2 sa-east-1
do
echo "$DC: $(ping -i .2 -c 10 -q ec2.$DC.amazonaws.com | awk -F/ '/^round|^rtt/{print $5}') ms"
done
echo ""
echo "GCP Ping Test: \n"
for DC in us-central1 us-east1 us-east4 us-west1 northamerica-northeast1 asia-east1 asia-east2 asia-northeast1 asia-south1 asia-southeast1 australia-southeast1 europe-north1 europe-west1 europe-west2 europe-west3 europe-west4 southamerica-east1
do
echo "$DC: $(ping -i .2 -c 10 -q $DC-gce.cloudharmony.net | awk -F/ '/^round|^rtt/{print $5}') ms"
done
echo ""
echo "Vultr/Choopa Ping Test: \n"
for DC in nj-us il-us ga-us fl-us tx-us sjo-ca-us wa-us tor-ca fra-de ams-nl par-fr lon-gb syd-au sgp hnd-jp
do
echo "$DC: $(ping -i .2 -c 10 -q $DC-ping.vultr.com | awk -F/ '/^round|^rtt/{print $5}') ms"
done
Executable
+38
View File
@@ -0,0 +1,38 @@
echo "DigitalOcean Speed Test: (100MB each) \n"
for DC in NYC1 NYC2 NYC3 SFO1 SFO2 TOR1 LON1 FRA1 AMS2 AMS3 SGP1 BLR1
do
echo "$DC: $(wget -O /dev/null http://speedtest-$DC.digitalocean.com/100mb.test 2>&1 | awk '/\/dev\/null/ {speed=$3 $4} END {gsub(/\(|\)/,"",speed); print speed}')"
done
echo ""
echo "Linode Speed Test: (100MB each) \n"
for DC in newark atlanta dallas fremont london frankfurt singapore tokyo2
do
echo "$DC: $(wget -O /dev/null http://speedtest.$DC.linode.com/100MB-$DC.bin 2>&1 | awk '/\/dev\/null/ {speed=$3 $4} END {gsub(/\(|\)/,"",speed); print speed}')"
done
echo ""
echo "AWS Speed Test: (10MB each) \n"
for DC in us-east-1 us-west-1 us-west-2 eu-central-1 eu-west-1 eu-west-2 ap-northeast-1 ap-south-1 ap-southeast-1 ap-southeast-2 sa-east-1
do
echo "$DC: $(wget -O /dev/null http://$DC-ec2.cloudharmony.net/probe/test10mb.jpg 2>&1 | awk '/\/dev\/null/ {speed=$3 $4} END {gsub(/\(|\)/,"",speed); print speed}')"
done
echo ""
echo "GCP Speed Test: (10MB each) \n"
for DC in us-central1 us-east1 us-east4 us-west1 northamerica-northeast1 asia-east1 asia-east2 asia-northeast1 asia-south1 asia-southeast1 australia-southeast1 europe-north1 europe-west1 europe-west2 europe-west3 europe-west4 southamerica-east1
do
echo "$DC: $(wget -O /dev/null http://$DC-gce.cloudharmony.net/probe/test10mb.jpg 2>&1 | awk '/\/dev\/null/ {speed=$3 $4} END {gsub(/\(|\)/,"",speed); print speed}')"
done
echo ""
echo "Vultr/Choopa Speed Test: (100MB each) \n"
for DC in nj-us il-us ga-us fl-us tx-us sjo-ca-us wa-us tor-ca fra-de ams-nl par-fr lon-gb syd-au sgp hnd-jp
do
echo "$DC: $(wget -O /dev/null http://$DC-ping.vultr.com/vultr.com.100MB.bin 2>&1 | awk '/\/dev\/null/ {speed=$3 $4} END {gsub(/\(|\)/,"",speed); print speed}')"
done