Question
Why download speed from my droplet is slow in my region?
I’ve compared download speed between my droplet and heroku app. I use https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
to test the speed. The output is:
digitalocean droplet:
Retrieving speedtest.net configuration...
Testing from DigitalOcean (128.199.177.39)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Viewqwest Pte Ltd (Singapore) [13.00 km]: 2.17 ms
Testing download speed.....................................
Download: 1538.82 Mbit/s
Testing upload speed.......................................
Upload: 1048.75 Mbit/s
heroku app:
Retrieving speedtest.net configuration...
Testing from Amazon.com (54.81.85.197)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Shentel Service Company (Weston, WV) [1516.87 km]: 16.456 ms
Testing download speed.....................................
Download: 534.61 Mbit/s
Testing upload speed.......................................
Upload: 533.36 Mbit/s
my device:
Retrieving speedtest.net configuration...
Testing from PT Telkom Indonesia (36.79.81.86)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by PT. Telekomunikasi Indonesia (Semarang) [2.99 km]: 12.958 ms
Testing download speed.....................................
Download: 19.49 Mbit/s
Testing upload speed.......................................
Upload: 3.82 Mbit/s
As you can see, the droplet has better speed than heroku both for download and upload. (My device is slow, I know). You can see there too that my heroku app is hosted from United States (Weston) and my droplet is hosted from Singapore. From my region (Indonesia), United States is the other side of the world and Singapore is my neighbor country. So, if I download something from both, my droplet should be faster right?
Then I test to download. I created a dummy server with nodejs to server a 10MB empty file.
require('http')
.createServer((req, res) => res.end(Buffer.alloc(10485760)))
.listen(parseInt(process.env.PORT || '5000'))
I run that dummy server in both my droplet and my heroku app. Then, I download that empty file with:
$ wget -q --show-progress <the address>
The output is:
**digitalocean droplet:*
index.html 100%[======================>] 10.00M 36.7KB/s in 5m 30s
heroku:
index.html 100%[======================>] 10.00M 2.27MB/s in 5.7s
See? That is unacceptable. What is causing this??
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×