By octopi
It takes 10+ seconds for an HTTP request from my Droplet to another server to complete. I can confirm that it’s not an issue with poor application code, but something deeper at the networking level. Just running basic curl and outputting timings produces:
$ curl -w "@curl-timings" -o /dev/null -s google.com
time_namelookup: 10.044
time_connect: 10.045
time_appconnect: 0.000
time_pretransfer: 10.045
time_redirect: 0.000
time_starttransfer: 10.065
----------
time_total: 10.065
But as soon as you replace the domain name:
$ curl -w "@curl-timings" -o /dev/null -s 173.194.123.70
time_namelookup: 0.000
time_connect: 0.001
time_appconnect: 0.000
time_pretransfer: 0.001
time_redirect: 0.000
time_starttransfer: 0.039
----------
time_total: 0.039
This smells like something to do with how my Droplet is performing DNS lookup/resolution, but I don’t really know where to start looking or what to poke around at. Any help?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Seems like the problem is that you are listing a resolver 4.2.2.2, which doesn’t want anything to do with your droplet. The delay you suffered were from every lookup first timing out on the first entry before moving on to the second.
Unless you have any particular reason for wanting to use 4.2.2.2, you might instead want to use both the Google resolvers in your resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.